According to Very Sleepy of the 50% or so CPU time taken up by the ::processFrame function, which itself is 50% of CPU time used, is in the minimap, particularly updateUnitTex. I have never fiddled with the minimap, but perhaps one of the GAE programmers is aware of this issue and why it happens. It seems weird that this function, for something as irrelevant as the minimap, is taking up 25% of CPU time, even after you factor in all the extra stuff that Mandate has in gameplay over GAE.
The more I refine my additional code the larger % of time taken up by the minimap. Its basically 40% of all time according to the profiler. Other significant time is spent mainly on the UI and my new AI. AI is 10%. UI is 10%.
I will probably fiddle around with the minimap code in a couple weeks to see what is up.
I just set the minimap to updateUnitTex every 20 frames instead of 5. Lag disappeared magically. Now minimap is about 10% of total time. And the difference honestly isn't very visible, the minimap is so low res anyways.