Sign in to follow this  
Followers 0
Dude

High CPU Usage...

4 posts in this topic

Hi,

after starting the script and waiting 1 to 2 Minutes, the CPU usage goes very high. Why?

hk_favoriten.au3

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

after starting the script and waiting 1 to 2 Minutes, the CPU usage goes very high. Why?

<{POST_SNAPBACK}>

Didn't test it but looked at the code. You have a big loop to poll all those check boxes. why not use a Treeview with the tvs checkboxes style instead. That should lower cpu usage. here is an example of what one would look like.

Posted Image

(Look in the bottom right corner to see the example.)

Edit: Just realized that that wasn't a loop. it is only called when the ok button is clicked. Sorry for the mistake.

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

Hi,

after starting the script and waiting 1 to 2 Minutes, the CPU usage goes very high. Why?

<{POST_SNAPBACK}>

You are using opt("GUIOnEventMode", 1) so GUIGetMsg() fails...

Replace:

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

with:

While 1
    Sleep(10)
WEnd

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You are using opt("GUIOnEventMode", 1) so GUIGetMsg() fails...

Replace:

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

with:

While 1
    Sleep(10)
WEnd

<{POST_SNAPBACK}>

Thanks a lot :(

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