Game Development Community

Performance issue...

by Stephen Nichols · in Torque Game Builder · 07/26/2009 (8:42 am) · 0 replies

It seems that TGB is, by default, compiled with "TORQUE_MULTITHREAD" defined. Sadly, there are two problems with this:

1. TORQUE_MULTITHREAD isn't check properly over all of the code. This causes mutex locks to be taken / released on many classes.

2. The platform mutex is using the Windows mutex kernel object which is very slow. I'd suggest converting this to a critical section for better performance.

I've fixed these two issues on my local source for TGB. I've received a 200% increase in list-heavy operations once TORQUE_MULTITHREAD was removed and all mutex code was changed to respect that.

Just some food for thought... if you're doing lots of SimSet/SimDictionary manipulation in your code then this could be a problem for you as well.

steve