brianstill Posted February 3, 2006 Share Posted February 3, 2006 Here is the code I am referring to: -------START CODE----------- Func Update_Current_CPU() $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Processor", "WQL",_ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) For $objItem In $colItems GUICtrlSetData($CPU_Load,$objItem.LoadPercentage) GUICtrlSetData($Group1,"Current CPU Load: " & $objItem.LoadPercentage) Next EndFunc ---------END CODE------------ I have anrrowed the problem down to the For/Next loop. I can comment out the GUICtrlSetData line, and it still taked over 2 seconds to process the For loop. I used a TimeDiff to test just the $colItems command and it took 4/1000 of a second. The For loop took over 2 seconds to complete. During this time, the GUI is unresponsive. I am running 3.1.1.106 beta. Has anyone else seen this? Thanks! Link to comment Share on other sites More sharing options...
brianstill Posted February 3, 2006 Author Share Posted February 3, 2006 Anyone...Bueler? Bueler? Link to comment Share on other sites More sharing options...
Confuzzled Posted February 9, 2006 Share Posted February 9, 2006 Anyone...Bueler? Bueler? I think Bueler went fishing... Link to comment Share on other sites More sharing options...
aajames Posted February 9, 2006 Share Posted February 9, 2006 In my experience, AutoIt loops are EXTREMELY slow... In a small app that I recently built i had to do a series of loops and in what should have taken 1 second at most, it took about 2 minutes... i searched and searched for ways around this and finally gave up, trashing the project. I love Autoit, but I tend to think it is just a weakness of the language... good luck. Link to comment Share on other sites More sharing options...
brianstill Posted November 14, 2006 Author Share Posted November 14, 2006 <bump> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now