Skip to content

[WIP] SM/Narsie Endgame Optimizations

Rob Nelson requested to merge pull/2249/opt into Bleeding-Edge

Created by: clusterfack

I profiled the endgame scenarios and what I found was that the area procs power_change 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 during a Narsie/SM endgame start, to sleep till the next tick after completing each zlevel. Which may(?) help make the events 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, and it also does in fact disable all the lights/machinery/apcs, but lets give it a good look over.

Merge request reports