Increasing TorqueScript speed by reducing overhead Resource
by Cai Yundong · in Torque 3D Professional · 05/17/2010 (9:18 pm) · 3 replies
http://www.torquepowered.com/community/resource/view/18045/
Wonder if this has been implemented or is going to be implemented in 1.1 as per Tom's comment on the first page ? From what i can see in the 1.1b1 code, it has not been implemented, and yet there have been changes to some portions of the code, making implementation of the resource a little more tricky. I personally hope that it will be implemented as anything which makes TorqueScript faster is Good =P
Wonder if this has been implemented or is going to be implemented in 1.1 as per Tom's comment on the first page ? From what i can see in the 1.1b1 code, it has not been implemented, and yet there have been changes to some portions of the code, making implementation of the resource a little more tricky. I personally hope that it will be implemented as anything which makes TorqueScript faster is Good =P
About the author
Recent Threads
#2
I did implement this resource successfully in TGEA and am more concerned with the performance gain then the reduced memory usage.
05/18/2010 (8:15 pm)
Oh Well, i figured this might be the cause of my slowdown after porting from TGEA 1.8.2 it T3D, since everything is exactly the same, and even less (no ground cover etc), and yet my fps in basic lighting is less then 1/2 of TGEA (40++ in TGEA, about 12-17 tops in T3D). I thought this might be due to a cpu bottle neck as i have tons of AI Bots, (Animals, and NPCs) moving around and doing stuff via script. Its an RPG, not an FPS, and so the script is a little more complicated with pathfinding, day to day activities for each npc, calculating what to do in the event they are obstructed from carrying out their activity etc, tons of loops and schedules etc. So i thought the more complicated script might be the bottle neck.I did implement this resource successfully in TGEA and am more concerned with the performance gain then the reduced memory usage.
#3
There isn't a way to profile individual script code, however, but if the profiling show tons of time spent not rendering nor moving stuff around, it's probably your scripts.
05/19/2010 (6:09 am)
Before optimizing anything, do some profiling to determine where our bottlenecks are:profilerEnable(true); // Starts profiling profilerEnable(false); // Stops profiling profilerDumpToFile(%filename); //Dumps the profile data to a file
There isn't a way to profile individual script code, however, but if the profiling show tons of time spent not rendering nor moving stuff around, it's probably your scripts.
Associate Manoel Neto
Default Studio Name
Also tons of changes were made lately in regards to memory allocation in the script stack. I noticed memory usage when using tons of scripts dropped quite significantly. In our game, the dedicated server RAM usage dropped by 30MB.