Files
Bubberstation/code/controllers/subsystem
SkyratBot 3a83197b22 [MIRROR] Optimize cutting part of update_icon (Saves 130+ms of init) [MDB IGNORE] (#19853)
* Optimize cutting part of update_icon (Saves 130+ms of init) (#73965)

Avoids calling `cut_overlay` if we know that we manage every overlay
we're about to remove, and short-circuits to `overlays = null`. This
saves the cost of building the appearance list and performing `-=` of
the list.

More minor change, splits validation part of `POST_OVERLAY_CHANGE` into
`VALIDATE_OVERLAY_LIMIT`. This is because there is no point checking if
we hit the overlay limit after removing overlays, since we would've
checked in `add_overlay` in reasonable cases.

* Optimize cutting part of update_icon (Saves 130+ms of init)

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-03-15 00:48:29 +00:00
..
2023-01-13 18:26:25 -05:00
2023-01-24 14:27:00 -08:00