Robustin says:
The very heart of our overlay code, a single line that basically boiled
down to overlays = new_overlays, was the cause of so much overlay lag.
Human overlay code was by far the biggest culprit. Most objects have 0-2
overlays but humans are marching around with 20+ most of the time and
the current system was spending a LOT of effort comparing 20+ image with
20+ other images and then apparently rendering them all anyway. Human
overlays are at least 10x the cost of any other overlay process and on a
busy server the overlay compiling was 2x the cost of any other system.
I compared the cost of overlay changes by picking up/dropping a PDA in
the dorms 250 times, with a 50% chance to use our current overlay
compiler and a 50% chance to use a "direct addition/removal (+=, -=)
approach:
CURRENT 1120ms 133 (avg:8.4210529327392578)
SCRAPS 6ms 112 (avg:0.0535714291036129)
Now this PR makes our whole overlay subsystem use that approach for
overlay compiling and the early results look incredible. The best part
is this is just the START of improvements. Humans benefits the most
because their icon system was already designed for small, incremental
overlay updates. By moving other code from "Cut everything, then put it
all back" to only updating the necessary overlays (cough, APC's), we can
see similar improvements.
oranges says:
I've picked up this PR because robustin vanished, but I do see the value
in the approach, only things I added were the checks for the overlay
list len changing
I also retabbed the entire file because I am a brainlet and did it
without thinking
* giant dad set
* twop underway
* initial
* initial
* no special armors :((((
* bye twop
* no more special armors
* f
* more removals
* fixes
* normieizing the armors pt1
* ok, finally
* I'M DONE I DID IT
* removals
* this will not compile but next commit in two commits it will
* this will not compile but next commit it will
* it compiles 20 dollars says it compiles
* i am so sorry
* fixes everything, >:(
* *coughs up hairball*
* cobby's suggestion
* pbool'f fhttrfgvba
* OOOOOOOOH YEAAAAAAAH BABY
* quieter
* AH OKAY THERE
Before we only warned if the wait was 1 or higher to solve issues with objects settings timers on themselves while getting qdeleted, a common enough usecase to support (even if it is annoying), but then I remembered we could check for qdestroying directly.
Also fixes it so such `destory()` time timers actually run consistantly. before they would only work if called after the `..()` in `destroy()`
Because sstimer tracks timers internally in the terms of what "byond tick" they are suppose to run at; float wait values are now rounded *up* to the next Byond Tick rather then have byond round the resulting list index *down* at access time.
0 wait timers are now rounded *up* to `world.tick_lag` to avoid incompabilities with editing the current tick's bucket while it was being processed.
For planned change to how TGS initializes server instances ahead of time so rounds aren't tracked as being far longer than they really would be. Similarly end time split for a more accurate round duration.
The total number of assets to be sent has been reduced from 1532 to 76, with time between first asset and last going from about 112s to about 7s (a 93% reduction) by my measure. The following assets have been coalesced:
705 pipe images (used by RPD) -> 1 spritesheet + css
595 research design icons (used by R&D console) -> 3 spritesheets + css
116 OOC emoji + 15 language icons -> 1 spritesheet + css
27 PDA icons -> 1 spritesheet + css
11 paperwork stamps -> 1 spritesheet + css
This is primarily a compatibility layer that enables both forward and backward compatibility for all past and future APIs based on the detected running TGS version. It also bundles all it's includes to make future upgrades not have to modify the dme, heck, could even use a submodule if it wanted (not happening). No other changes necessary.
There's an upcoming event system and new chat management functions. Check them out here: 303448457e/DMAPI/tgs.dm
Also added /datum/proc/CanProcCall()
* station lovin' happened so fast
* Update stationloving.dm
* less qdel memes
* imbue soul signal
* rename imbue soul signal
* dupemode
* henk
* Update atoms_movable.dm
* Update nuclearbomb.dm
* Update nuclearbomb.dm