W
Walter Briscoe
Guest
I have a web access application which takes about 16 elapsed hours to do
about 10k lookups.
I want to speed it. At the lowest level, there is an array of up to 11
items, of which some need to access the web.
My driving data is Excel, I script in VBA, I use Set IE = CreateObject("
InternetExplorer.Application") to create a single instance of IE8 which
I drive with many calls of IE.Navigate2. I believe that most time is
spent in Do Until Not IE.busy And IE.ReadyState = 4: DoEvents: Loop.
My first optimisation thought was to have an array of 11 instances of
IE8, fire up to 11 IE.Navigate2 calls and wait for each to finish. This
should allow up to 11 waits in parallel. This seems to overload my
machine. My next thought was to use 11 tabs in a single instance of IE8.
I have Const navOpenInNewTab = 2048 and can use IE.Navigate2 URL1,
navOpenInNewTab to open URL1 in a new tab. There seems to be no
programmatic method to switch between tabs or to reuse a tab.
intriguingly says "When navOpenInNewWindow or navOpenInNewTab is
specified, the caller does not receive a reference to the WebBrowser
object for the new window, so there is no immediate way to manipulate
it."
Can someone suggest a non-immediate way?
PS: I might have asked this in an MSDN forum. I don't know how to use
them or select an appropriate one. This may not be the most appropriate
newsgroup; microsoft.public.internetexplorer.scripting seems defunct.
PS2: IE8 sometimes ties itself in knots, downloading images which do not
interest me. I already use
RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
"Display Inline Images", "no"
RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
"Expand Alt Text", "yes"
to eliminate image download and see image alternative text.
--
Walter Briscoe
about 10k lookups.
I want to speed it. At the lowest level, there is an array of up to 11
items, of which some need to access the web.
My driving data is Excel, I script in VBA, I use Set IE = CreateObject("
InternetExplorer.Application") to create a single instance of IE8 which
I drive with many calls of IE.Navigate2. I believe that most time is
spent in Do Until Not IE.busy And IE.ReadyState = 4: DoEvents: Loop.
My first optimisation thought was to have an array of 11 instances of
IE8, fire up to 11 IE.Navigate2 calls and wait for each to finish. This
should allow up to 11 waits in parallel. This seems to overload my
machine. My next thought was to use 11 tabs in a single instance of IE8.
I have Const navOpenInNewTab = 2048 and can use IE.Navigate2 URL1,
navOpenInNewTab to open URL1 in a new tab. There seems to be no
programmatic method to switch between tabs or to reuse a tab.
intriguingly says "When navOpenInNewWindow or navOpenInNewTab is
specified, the caller does not receive a reference to the WebBrowser
object for the new window, so there is no immediate way to manipulate
it."
Can someone suggest a non-immediate way?
PS: I might have asked this in an MSDN forum. I don't know how to use
them or select an appropriate one. This may not be the most appropriate
newsgroup; microsoft.public.internetexplorer.scripting seems defunct.
PS2: IE8 sometimes ties itself in knots, downloading images which do not
interest me. I already use
RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
"Display Inline Images", "no"
RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
"Expand Alt Text", "yes"
to eliminate image download and see image alternative text.
--
Walter Briscoe