Hellfire Posted May 5, 2006 Posted May 5, 2006 What are the best ways to reduce the cpu usage the script uses, my script is using 50-70. It's a big loop that never stops until the script ends.
Paulie Posted May 5, 2006 Posted May 5, 2006 What are the best ways to reduce the cpu usage the script uses, my script is using 50-70.It's a big loop that never stops until the script ends.Post Script PLZ
Lakes Posted May 5, 2006 Posted May 5, 2006 Try Sleep(10) ? 2015 - Still no flying cars, instead blankets with sleeves.
Uten Posted May 5, 2006 Posted May 5, 2006 While 1 ; I prefere switch for redability, but a test I did once indicated that select or ofs are faster. switch GetGuiMsg() case 0 sleep(250); You should not sleep more as this could cause msg loss case else ; handel your msg. endswitch ; I don't think you should place sleep statements here (as quite many do) as this will ; Make you sleep between each msg and that could make your app unresponsive when it has ; work to do. Wend Use the same pattern fro a GetTrayMsg() loop. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
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