Performance Issues (strange Pstats results)

i have a suggestion which i dont know if it works for your application.

you seperate the graphics changes from the gamestate changes (save that a change happened, but dont show it). You only update the parts of the graphics changes that are in or close to the camera’s lens frustum. And/Or if every building is changed every frame, only update it every 2nd frame etc (aka split the scene into 60 chunks, update 1chunk per frame).

And another hint: look at sim city, i would not suspect that every building is updated every frame. This also can cause problems, think of a building having 2 states (like poor/well going) and due to some factors these inputs create a change every frame. If you update the graphics every frame you would have flickering objects, while if you update only every second (or even less) it would look normal.