d3athrow/vgstation13 — pull request #2249 by clusterfack (2014-12-17 16:48:14+00:00)
Title: SM/Narsie Endgame Optimizations

I profiled the endgame scenarios and what I found was that the area procs change_power and stationalert were really hogging much of the cpu usage. Which is needless considering these endgame events absolutely wreck almost all the APCs.

What this does:
-Defines a global var that will be called when the world is in an unrecoverable endgame scenario
-This var stops stationalert from ever being called again before we break all the cameras/apcs/etc on the station
-The var also allows areas to update machinery power from the area APCs to update one more time, after we've set them all to broken
-Defers the powernet rebuilding for all eternity, because there is literally no point the powernets are all dead son.

Also:
-Sets the space turf overlays, the only other major source of lag, to sleep till the next tick after completing each zlevel. Which may(?) help make the summonings bearable. I'll need some input on this.

From what I've profile these has eliminated most of the hogging of power_change and stationalert, but lets give it a good look over.