CephaXz
2012-06-10 06:00:55
Have been scripting for a while now. I'd like to minimize the script ram and cpu usage as low as it can be. But I'm not sure what in a script that would cause them to increase, other than dtm or bitmap.
I have been starting and freeing my dtm with this method
So I'd like to have some advices or suggestions. What would increase the resource usage in a script? And how can I reduce them?
I used 7 DTMs in total
SPS and ODTM walking, radialwalking as backup
Removed painting smart
TPA
Only one symbol finding
Others are just srl functions, and 1.3k lines script
I have been starting and freeing my dtm with this method
begin
SetupLogin;
AddOnTerminate('FreeAllDTM');
AddOnTerminate('TakePhoto');
StartAllDTM;
repeat
MainLoop;
until not LoggedIn;
end.
It uses around 500b-550mb ram usage. So I thought only start when using them and free them after used would be more efficient. I started the dtm only in procedure that use it and free them at the end of the procedure. I see results, using only 400mb++, which is better than my normal method. But after few hours, its using 700mb+ :duh:So I'd like to have some advices or suggestions. What would increase the resource usage in a script? And how can I reduce them?
I used 7 DTMs in total
SPS and ODTM walking, radialwalking as backup
Removed painting smart
TPA
Only one symbol finding
Others are just srl functions, and 1.3k lines script