How can I optimize my patches?Up to Table of Contents
This FAQ applies to: Any version.
One of the biggest performance hits is having UI elements in your patch which have to be updated.
The biggest performance hog is the number box. While the number box is great for debugging, make sure that they are all gone from your "release" patch.
If you run a performance meter, you will see that whenever Tcl/Tk has to update the user interface, it sucks the entire processor. Another examples of this is when you move a lot of objects at once, everything jerks and slides across the screen. There are probably ways to improve this...
Another problem is doing unneccessary calculations. When you are throwing lots of numbers around, especially packing/unpacking, doing vector math, etc., they add up. If the calculations are going unused (for instance, that part of the patch is turned off), then do not trigger the math objects.
Use [spigot] and block the events early. This is especially important with objects that send a lot of numbers, like ~-objects or [line]/[tripleLine].
- Why is GEM slow in general?
- Why is GEM slow on IRIX?
- Why is GEM slow on WinNT/Win95/Win2k/WinXP/...?
- Why is GEM slow on Linux?
- Why is [pix_draw] so slow?