## About The Pull Request
As the title says.
`init_order` is no more, subsystems ordering now depends on their
declared dependencies.
Subsystems can now declare which other subsystems need to init before
them using a list and the subsystem's typepath
I.e.
```dm
dependencies = list(
/datum/controller/subsystem/atoms,
/datum/controller/subsystem/mapping
)
```
The reverse can also be done, if a subsystem must initialize after your
own:
```dm
dependents = list(
/datum/controller/subsystem/atoms
)
```
Cyclical dependencies are not allowed and will throw an error on
initialization if one is found.
There's also a debug tool to visualize the dependency graph, although
it's a bit basic:

Subsystem load ordering can still be controlled using `init_stage`, some
subsystems use this in cases where they must initialize first or last
regardless of dependencies. An error will be thrown if a subsystem has
an `init_stage` before one of their dependencies.
## Why It's Good For The Game
Makes dealing with subsystem dependencies easier, and reduces the chance
of making a dependency error when needing to shift around subsystem
inits.
## Changelog
🆑
refactor: Refactored subsystem initialization
/🆑
* Adds a config to change the interval profiler information gets saved (#83849)
## About The Pull Request
As title says
## Why It's Good For The Game
Important for server operation
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Adds a config to change the interval profiler information gets saved
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Saves profiler snapshots every 5 minutes (#83467)
## About The Pull Request
As the title says. Each saved snapshot will be named
- `profiler-[TIME IN SECONDS].json`
- `sendmaps-[TIME IN SECONDS].json`
For example, `profiler-0.json`, `profiler-300.json`, `profiler-600.json`
would correspond to a profile at the start of the round, a profile 300
seconds into a round and a profile 600 seconds into a round.
The timings depend on world.time, so it's probably not a good idea to
rely on these timings to stay consistent.
## Why It's Good For The Game
Allows us to track performance of procs over time. Could allow us to
spot any sort of anomalies or performance sinks.
CC: @ MrStonedOne @ bobbah @ LemonInTheDark
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Saves profiler snapshots every 5 minutes
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Emergency Profile Dumps (#75924)
## About The Pull Request
Adds some hooks to the MC that detect if something ate a ton of real
time last tick, and reacts by dumping our current profile into a file
It's really frustrating to see a spike in td in our performance logs,
but see no reason in the profile because it's only taken every 5
minutes. This resolves that
I'm throwing this up so mso can give it a look over, not sure if I want
to use defines or configs here, taking suggestions
🆑
server: Adds a system to emergency dump profiles if too much time passes
between ticks
config: Added configs that control how often emergency profiles are
allowed to dump, alongside the threshold for what counts as too much
time between ticks
/🆑
* Emergency Profile Dumps
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* Remove SS_NO_TICK_CHECK (#57800)
## About The Pull Request
This is a whopper, will need @ MrStonedOne to review.
In theory this flag shouldn't be needed and my own testing didn't find any issues, but I'd feel better with a lengthy test merge.
## Why It's Good For The Game
Might make nightshift subsystem lag less, MC loop has less stuff to check.
* Remove SS_NO_TICK_CHECK
Co-authored-by: spookydonut <github@spooksoftware.com>
* The profiler now starts earlier into the init process. + Documents the initialization order and pipeline (#52662)
* The profiler now starts earlier into the init process.
Also documents the init pipeline and order in world/New()'s codedoc.
* better early profiler
* NEWMAN!
* The profiler now starts earlier into the init process. + Documents the initialization order and pipeline
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Log fetch and write costs in SSprofiler.
* Update profiler.dm
* Update profiler.dm
* Add performance enhancements
This should ensure it doesn't lag the server too much.
* Minor text changes