Files
Bubberstation/code/_experiments.dm
SkyratBot ef1ad8331a [MIRROR] Experiment with holding hard references to objects being qdeleted in 515 (saves 1.1+ seconds on init times, more on prod) [MDB IGNORE] (#18361)
* Experiment with holding hard references to objects being qdeleted in 515 (saves 1.1+ seconds on init times, more on prod) (#72033)

## About The Pull Request
Adds `EXPERIMENT_515_QDEL_HARD_REFERENCE`, which will queue to the GC
subsystem using hard references rather than `\ref`. This is only
possible in 515 because of the new `refcount` proc. `\ref` is very very
slow and has some nasty knock on effects, so removing its usages where
possible is good.

This is an explicit opt in define because I want to give us the ability
to test 515 on live while only testing 515 itself, not our experimental
changes. We have a few more of these we want to do so I made a separate
file for them. They're auto-defined in unit tests so we see them with
the alternate test runner. In a perfect world we'd test both on and off,
but eh.

Closes https://github.com/tgstation/dev-cycles-initiative/issues/10

* Experiment with holding hard references to objects being qdeleted in 515 (saves 1.1+ seconds on init times, more on prod)

* fix missed underbarrels

* HEV radio

* Keeps gc_destroyed from getting updated on every step thru the gc queue. (#72401)

Keeps gc_destroyed from getting updated on every step thru the gc queue.

Fixes logic that assumed gc_destroyed is the time the object first
qdel'ed. it used to get updated on each stage of the garbage controller
and there are 3 stages.

Added list index defines for the inner gc item list.

* test fix

* final fix

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2023-01-12 16:16:33 -05:00

22 lines
764 B
Plaintext

// This file contains experimental flags that may not be production ready yet,
// but that we want to be able to easily flip as well as run on CI.
// Any flag you see here can be flipped with the `-D` CLI argument.
// For example, if you want to enable EXPERIMENT_MY_COOL_FEATURE, compile with -DEXPERIMENT_MY_COOL_FEATURE
// EXPERIMENT_515_QDEL_HARD_REFERENCE
// - On 515, will hold a hard reference for qdeleted items, and check ref_count, rather than using refs.
#if DM_VERSION < 515
// You can't X-macro custom names :(
#ifdef EXPERIMENT_515_QDEL_HARD_REFERENCE
#warn EXPERIMENT_515_QDEL_HARD_REFERENCE is only available on 515+
#undef EXPERIMENT_515_QDEL_HARD_REFERENCE
#endif
#elif defined(UNIT_TESTS)
#define EXPERIMENT_515_QDEL_HARD_REFERENCE
#endif