alienkillaz Posted October 1, 2005 Posted October 1, 2005 im pretty sure i read a thread some while back about reducing cpu usage.. i dont know if it can help me much but if anyone has any code that can reduce the cpu usage it'd be appreciated
Developers Jos Posted October 1, 2005 Developers Posted October 1, 2005 im pretty sure i read a thread some while back about reducing cpu usage.. i dont know if it can help me much but if anyone has any code that can reduce the cpu usage it'd be appreciatedThis really depends on the script you are making but in While..Wend or Do..Until loops you sometimes need a Sleep(10) to slow the script down.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
kjactive Posted October 1, 2005 Posted October 1, 2005 (edited) one could also reduce memory use by cut off all unitiated msg returns right in the start of a while/end like this... While 1 $msg = GUIGetMsg(1) Select Case $msg[1] = 0 // cut off non initiated returns Case $msg[1] = $MainWin Case etc. Endselect In this manner your script do not have to evaluate all the unnessesary zeros doing all the CASE entries... kjactive Edited October 1, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
Valuater Posted October 1, 2005 Posted October 1, 2005 not sure... but i have a hunch you were looking for thishttp://www.autoitscript.com/forum/index.ph...pe=post&id=3198its a memory usage reduction script8)
kjactive Posted October 1, 2005 Posted October 1, 2005 (edited) alienkillaz is talking about 'reducing cpu usage' and that's not the same as memory reduce. CPU do in normal conditions not use any memory while memory use a little CPU to hold a program in memory but the actually calculations is done by the cpu and in any other languages when there is nothing going on, the 'cpu sleeps' so to speak... Autoit3 gui has another way to work and a problematic cpu use as autoit tics ( returns a message ) at 250 times a second as default ( can be changed ) even if there is nothing going on and that's to update all the automatically functions like to catch external lists etc. but if one has a while / WEnd script with lots of Cases to evaluate this would take up some CPU usage to evaluate well quiet a lot actually and If one has two or three scripts going on at the same time - the cpu could reatch near a limit border... That's why I catch all uninitiated msg message returns right at the beginning so the script do not has to read and evaluate any unnessasary tics and save some cpu time... Autoit3 gui works in most conditions but one has to be carefully planning CPU usage to be shure to unvoide problems or conflickts in future, I say anyway... kjactive Edited October 1, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
Valuater Posted October 1, 2005 Posted October 1, 2005 alienkillaz is talking about 'reducing cpu usage' and that's not the same as memory reduce. CPU do in normal conditions not use any memory while memory use a little CPU to hold a program in memory but the actually calculations is done by the cpu and in any other languages when there is nothing going on, the 'cpu sleeps' so to speak...Autoit3 gui has another way to work and a problematic cpu use as autoit tics ( returns a message ) at 250 times a second as default ( can be changed ) even if there is nothing going on and that's to update all the automatically functions like to catch external lists etc. but if one has a while / WEnd script with lots of Cases to evaluate this would take up some CPU usage to evaluate well quiet a lot actually and If one has two or three scripts going on at the same time - the cpu could reatch near a limit border...That's why I catch all uninitiated msg message returns right at the beginning so the script do not has to read and evaluate any unnessasary tics and save some cpu time...Autoit3 gui works in most conditions but one has to be carefully planning CPU usage to be shure to unvoide problems or conflickts in future, I say anyway...kjactive i am aware of the difference but....1i think like a hobbyist2there is no code ( that i am aware of ) to reduce CPU usage3he clearly states there was a thread about it4i took a shot in the darkthanks kjactive8)
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