Sign in to follow this  
Followers 0
Zenar

IE slows down to a crawl

7 posts in this topic

Hello everyone,

I have been using autoit for a few months but I am still pretty new at it. I have created scripts that do pretty basic things. I selected a few lines of code from one of my scripts to isolate my issue as much as possible:

$uRL = "url"
$oIE = _IECreate ($uRL)
HotKeySet("`", "lookup")

Func lookup()

Send ("^{c}")
_IENavigate($oIE, $uRL)
$oForm = _IEFormGetObjByName($oIE, $s_name)
$oQuery = _IEFormElementGetObjByName($oForm, $s_name)
$input = ClipGet()

_IEFormElementRadioSelect($oForm, $s_string , $s_name , 1, "byValue")
_IEFormElementSetValue($oQuery, $input)

_IEFormSubmit($oForm)

End Func()

While 1
    Sleep(10)
WEnd

The code is not the actual code but an attempt to show what is going on. As you see its very simple. The idea is that I have some text highlighted before I press the ` key. The script will press CTRL C to put that text in the clip. It will then navigate to the right website address, look for IDs of boxes etc, put the clip in that box and click the submit button.

I use this Hotkey very frequently throughout the day and by the end of the day, the whole process will be very slow. My solution for fixing the slow down is to close the internet browser window (closing a tab only will not work) and have the script reopen it by itself or simply restart the script. All signs point towards Internet Explorer as being the problem but I thought i'd ask here in case there is something I am not seeing in my script.

Closing the browser on occasion is not a big deal but some of my scripts will crawl through thousands of webpages to gather data. I have resorted to have my script close and reopen the browser by itself after a certain period of time to improve performance. It works but its kind of stupid to have to do that. IE will slow down weither I have pictures showing or not. Perhaps there is a setting in the browser I need to adjust before crawling through the web?

I have used the search function to see if anyone else had this problem in these forums but I had no luck. If this has been mentionned and resolved in the past, excuse me for posting this again and kindly point me towards the solution.

Thank you for your time and your input.

Zenar

Share this post


Link to post
Share on other sites



Is there a question in there somewhere?


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Is there a question in there somewhere?

Why is Internet Explorer slowing down?

Besides having my scripts shut IE down periodically, what should I do so that IE never slows down?

Is there something in my code that is causing IE to slow down?

Would IE create or IE attach every time the hotkey is pressed cause this? I have tried both and I have the same issue.

I apologize if my inquiry was not clear enough in my original post.

Again, thanks for your time.

Share this post


Link to post
Share on other sites

That sounds suspiciously like it's related to the Temporary Internet Files (IE cache). To see if that is causing it, the next time it happens, clear the TIFs instaed of restarting IE. If that helps then that would indicate the cache as the likely source of the problem.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Thank you GEOSoft for your reply. I really appcreciate your input.

I have deleted all my TIF's and it seemed to have helped a little bit. The improvement was no where near the outcome of closing and reopening the browser though. I then deleted everything else: cookies, forms etc but no additional performance was gained. I will keep playing with the settings to find the culprit. I am assuming my script is fine since you haven't commented on it.

Thanks again for your reply.

Share this post


Link to post
Share on other sites

I see nothing intrinsic in your script that would cause a slowdown - at least in what you have posted.

Based on your description, I would be suspicious of browser addins and plugins as the source of trouble. Does the virtual memory for the iexplore.exe process grow throughout the day? Consider what you have loaded and consider disabling them. You could also consider starting a browser with Accessories->System Tools->Internet Explorer (no add-ons) and then attach to that one with _IEAttach instead of _IECreate when you kick this off.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

I have the same problem and haven't found a solution for over a year.

Internet Explorer slows down when my autoit tool is attached to IE.

It is very noticable when typing into a textarea or input field, half a second between the letters appearing on screen.

When typing fast, some letters are missing.

I've experimented with sleep(10), sleep(100) , sleep(500), ... in the main while loop but without success

btw, I'm using onEvent code

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0