-
-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defer creation of emergency power lights until needed -- Saves ~0.2s …
…of init time (#71729) (#10431) Every light was creating a power cell. Creating a power cell creates reagents, creates appearances, updates the appearances to reflect its charge, etc etc. It's very expensive. Of the 293ms, 1,652 calls of cell/Initialize, 196ms of it was emergency_light/Initialize. Defers it until necessary, `get_cell()` will produce the cell if it doesn't exist. Closes tgstation/dev-cycles-initiative#21 Co-authored-by: Mothblocks <[email protected]>
- Loading branch information
1 parent
8f1b562
commit 75acde9
Showing
1 changed file
with
29 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters