Commit Graph

5 Commits

Author SHA1 Message Date
SkyratBot
9c5408fe27 [MIRROR] Optimizes changing z level as a ghost by something like 85% [MDB IGNORE] (#19030)
Optimizes changing z level as a ghost by something like 85% (#73005)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

Optimizes hud image addition/removal on z change

We were doing a lot of repeated work here, not to mention all the proc
calls.
So I pushed the "operate on loops" behavior into its own proc, so I
could ensure we only do some of this stuff once

This plus some removal of safeties saves 75% of the cost of z level
transitions as a ghost

Prevents double on_changed_z_level calls from ghosts and shuttles

Reacting to z changes used to be done off doMove or one of those
children, timber moved it to Moved, but did not remove the calls that
assumed things like abstract_move wouldn't trigger it

This means that moving up/down as a ghost was causing a double call of
the whole z move stack. Suprised this never broke anything tbh

Makes csv stat tracking actually encode numbers properly, cleans up an
indev comment from plane group code

## Why It's Good For The Game

Speed, and fixes

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-01-29 23:50:33 +00:00
SkyratBot
002ab78d9b [MIRROR] useless update_appearance reduction, emissive_blocker micro optimization (saves a second of init) [MDB IGNORE] (#18243)
* useless update_appearance reduction, emissive_blocker micro optimization (saves a second of init)

* merge conflict

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2023-01-07 18:45:54 -05:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
2523df012f [MIRROR] Add EXPORT_STATS_TO_FILE_LATER to stat_tracking macros [MDB IGNORE] (#17380)
* Add EXPORT_STATS_TO_FILE_LATER to stat_tracking macros (#70893)

Adds a macro to the stat_tracking macros that lets you export
counts/costs into a JSON file, which is significantly easier to parse
with stuff like jq.

It is delayed because these macros are used to profile potentially
extremely hot functions, where we cannot afford to do I/O every time. It
is sent every second rather than waiting until all are done because it
can also be used to profile functions that are potentially called
constantly, forever.

Usual concerns about unused code being added do not apply as this entire
file is for profiling macros that are only ever used at time of
profiling, and are never ever merged to master.

* Add EXPORT_STATS_TO_FILE_LATER to stat_tracking macros

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-05 15:18:06 -04:00
Kyle Spier-Swenson
d7b537ce24 SSoverlay improvements and tweaks (#32371)
* Overlay per-type cost logging.

Overlays will now log how long each type took to process.

Changed up how overlays was done to account for the fact its a queue and not a processor. (it was using almost none of the processing subsystem framework)

Made the overlay loop faster by making it not cut the list until the end.

Added a simple generic benchmark stat tracking system.

I don't know how much overhead this adds to overlays. i may put it behind testing or something, but i do want to test this on the serbers to get some stats.

* Removes flush() as it was creating race conditions

* Use ref

* text2file

* Atoms added as an overlay will have their pending overlays compiled before being converted to an appearance
2017-11-10 20:25:29 +01:00