BigDog Posted August 2, 2008 Share Posted August 2, 2008 Dear Sir my script look like ... :----------------------------------------- ; ; sub1() sub2() ;.... sub()100() :... ; ; ; ;---------------------------------------- suppose these subs are all independent ! how could i let them run at the same time ? for improving performance Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 2, 2008 Share Posted August 2, 2008 Split them to multiple scripts and run at the same time .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
draco Posted August 2, 2008 Share Posted August 2, 2008 I don't really see the point. Your computer will process all the commands as quickly as it can. Running multiple scripts doesn't increase the speed at which it will run through the functions beyond however many processors you have. Each processor can only do one thing at a time, it just makes you think that it's doing more than one thing at a time because it's so fast. Link to comment Share on other sites More sharing options...
smashly Posted August 2, 2008 Share Posted August 2, 2008 I don't really see the point. Your computer will process all the commands as quickly as it can. Running multiple scripts doesn't increase the speed at which it will run through the functions beyond however many processors you have. Each processor can only do one thing at a time, it just makes you think that it's doing more than one thing at a time because it's so fast.The point would be:Say Sub(1) takes 15 mins to complete and the pc CPU and Memory usage are at 2% use while it's doing it's thing.Sub(2) takes 17mins to do it's thing and pc CPU and Memory usage are at 2% ...Sub(3) takes...... etcSo what I should wait 32mins for Sub(1) and Sub(2) to finish or run the both at the same time and have the task done in roughly 18 mins using roughly 5% of my CPU and Memory..So to me there is a great point in asking something like the op asked IMHO.I agree that you could never get all Subs starting at the exact same nano second, but maybe milliseconds apart wouldn't be so bad.Pipe the subs from the main script either into a tmp file and run autoit commandline against each tmp file script.This leaves the main script still able to do other things and the subs can get their job done in a shorter amount of time.Cheers Link to comment Share on other sites More sharing options...
draco Posted August 3, 2008 Share Posted August 3, 2008 I apologize for my answer then. It was my poor assumption that each function would be only a couple of commands each.** 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