Optimization of the isBoxVisible function
The unit renderer calls a lot the function isBoxVisible to know if the bounding box of a unit is visible. On a visual replay with 2000 turns, there are about 4.6M such calls. The attach patch optimizes it, mainly inlining some functions. But in addition, this function allows to have a shifted box, but is always called with (0,0,0), while several Vector3D creations per call are needed to take the possible shift into account. So I've added an overloaded function without this shift.
Running valgrind on the visual replay with 2000 turns, the time spent in this function goes from 0.8% (with 0.5% internal) of the total replay time to 0.4% (all internal), so a factor 2 decrease.
In 17561: