Sign in to follow this  
Followers 0
poisonkiller

Reduce IE CPU usage

8 posts in this topic

I'm using IE.au3 for some IE controlling, but I am facing a problem: IE takes too much CPU and gets laggy. How can I reduce CPU usage (currently I'm also using _ReduceMemory, but that doesn't lower CPU usage, which is about 20-30%)? Autoit itself uses 0-5% CPU.

Share this post


Link to post
Share on other sites



BUMP.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hello posionkiller,

I know on the client side, many of my loops would raise the CPU usage until I used a small wait state (i.e., Sleep(10)).

Can you post your script?

Zach...

Edited by zfisherdrums

Share this post


Link to post
Share on other sites

The Sleep(10) is the best thing to use in any loop to help keep CPU usage under control, actually.

Reducing the number of frivolous function calls is another.... Consider:

While 1
   $var = PixelSearch(0,0,50,50)
   $var2 =+ $var2
   If $var2 >50 then exitloop
wend
if $var = 0xFF8080 then _doSomething()oÝ÷ ÙhZ·l¶©¢)í¡÷X§Mú½ªùÒئzÂ-Á«-zÊk¡Ç¬²íÉ,2ÞÚ.¶íéh¢¡W²¢éÊz-«Þ²¶§«¢w­¨§yÖ¬¶­µ©jZ(«r¢êå¢ljwlyì!j×·¦¢÷¢ë@az»b¦+-¢Ç­q©eyÚ'qæ§v­{hjö«¦åz)ìµæ¡÷X§k¥¶*ezئzÀ¨Èz¶®¶­sbb33c·F×Ò7G&ætå7G"6ÆvWBÂgV÷C´D4ã¢gV÷C²¢b33c¶F6âÒ7G&æuG&ÔÆVgB7G&ætÖB6ÆvWBÂb33c·F×ÂrÂB¢b33c¶F6çGRÒ7G&æu&vB7G&ætÖB6ÆvWBÂb33c·F×Âr¢b33c·F×Ò7G&ætå7G"6ÆvWBÂgV÷C´w'æó¢gV÷C²¢b33c¶w'Ò7G&æu&vB7G&ætÖB6ÆvWBÂb33c·F×ÂrÂb¢b33c·F×Ò7G&ætå7G"6ÆvWBÂgV÷C´ÔTÔ$U"äó¢gV÷C²¢b33c¶ÖVÖ"Ò7G&æu&vB7G&ætÖB6ÆvWBÂb33c·F×Â#rÂ"oÝ÷ Ù'jYmॵƥƮ¶­sbb33c·67&VVâÒ7G&æu7G&u26ÆvWB¢b33c·F×Ò7G&ætå7G"b33c·67&VVâÂgV÷C´D4ã¢gV÷C²¢b33c¶F6âÒ7G&æuG&ÔÆVgB7G&ætÖBb33c·67&VVâÂb33c·F×ÂrÂB¢b33c¶F6çGRÒ7G&æu&vB7G&ætÖBb33c·67&VVâÂb33c·F×Âr¢b33c·F×Ò7G&ætå7G"b33c·67&VVâÂgV÷C´w'æó¢gV÷C²¢b33c¶w'Ò7G&æu&vB7G&ætÖBb33c·67&VVâÂb33c·F×ÂrÂb¢b33c·F×Ò7G&ætå7G"b33c·67&VVâÂgV÷C´ÔTÔ$U"äó¢gV÷C²¢b33c¶ÖVÖ"Ò7G&æu&vB7G&ætÖBb33c·67&VVâÂb33c·F×Â#rÂ"

Much faster this way.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

The problem is not in Autoit (it takes 0-5% of CPU), problem is in IE (which takes 30-100% of CPU). I need to reduce IE CPU usage, how can I do that? In my Autoit code there are plenty of Sleep() calls.

Share this post


Link to post
Share on other sites

The problem is not in Autoit (it takes 0-5% of CPU), problem is in IE (which takes 30-100% of CPU). I need to reduce IE CPU usage, how can I do that? In my Autoit code there are plenty of Sleep() calls.

Go to work for microsoft and make the code more efficient?


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

The problem is not in Autoit (it takes 0-5% of CPU), problem is in IE (which takes 30-100% of CPU). I need to reduce IE CPU usage, how can I do that? In my Autoit code there are plenty of Sleep() calls.

Without showing your code then helping you is near next to nil. Sleep() can possibly be your enemy under certain conditions so the mention means little to justify if Sleep() is indeed useful in your script. Seeing your code will allow others to identify the issue.

<_<

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

The problem is not in Autoit (it takes 0-5% of CPU), problem is in IE (which takes 30-100% of CPU). I need to reduce IE CPU usage, how can I do that? In my Autoit code there are plenty of Sleep() calls.

Oh, I see. If the problem does not reside with AutoIT, this forum may not be able to provide you with a satisfactory answer. At least, not until we can see what it is your script is trying to do.

Until then, I would suggest this: get a baseline reading for CPU usage in the following scenarios:

0 - when IE is opening

1 - when IE is open and doing "nothing"

2 - when IE has loaded the page you're working with

3 - when IE has loaded the page you're working with and you run all the actions in your script manually

That would help narrow down the non-AutoIt culprit(s) ( IE setting, the web page itself, plugin on the page, virus, etc ).

Edited by zfisherdrums

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