mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 11:32:20 +00:00
* 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>