On this note I noticed a fairly large performance sink in your CaliperCheck code. There are two things, and they both have to do with how you used “in”. First of all, you can significantly reduce your process time by cutting down the values you are checking for (what “cal_objects” does), and second of all you can reduce the time further by creating a dictionary (dictionaries use hash tables, which have very fast lookup speed)
It may seem minor when you only have a few objects, but the lookup time for using the “in” operator could be large if the scene contains thousands of objects AND you are traversing all of them (think about it, every search has to a linear search through every object. Hash tables, on the other hand… do magic through hashing). Additionally you are refreshing this function every time the screen updates so… that would be a big performance lag.
I haven’t done any performance tests (other than make sure it still runs). McBuff: could you check to see if this makes it better?
cleanup.zip (524 Bytes)