Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bans the use of icons and icon_state strings as overlay items; Adds a…
… note about abusing associated lists. (#58383) Bans the use of icons and icon_state strings as overlay items. Adds a note about using associated lists to cache things Why: Overlays get converted to appearances by byond on insert, so if we want to be able to do list math on the overlay lists, we have to do this conversion ourselves as well, otherwise -= "blah" wouldn't work as it won't be a string anymore. This requires creating a new appearance every time an overlay operation happens for these use case, or search for cached versions of them in an associated list. images, appearances and mutable appearances can be converted into an appearance for free because they already are appearances Associated lists have a lot of hidden overhead, leading to them to get abused for caching details that doesn't need to be cached. they are faster to search then normal lists, but slower then global, static, and proc vars, and very likely the same as datum vars, if not slower. They have a higher per item memory usage then global vars (8b), proc vars (8b), datum vars (16b), or flat lists (8b) because they have to store the key twice, once in the flat array for for loops, and again in the tree structure along with the value.
- Loading branch information