mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Micro-optimize qdel by only permitting one parameter (#80628)
Productionizes #80615. The core optimization is this: ```patch - var/hint = to_delete.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up. + var/hint = to_delete.Destroy(force) // Let our friend know they're about to get fucked up. ``` We avoid a heap allocation in the form of copying the args over to a new list. A/B testing shows this results in 33% better overtime, and in a real round shaving off a full second of self time and 0.4 seconds of overtime--both of these would be doubled in the event this is merged as the new proc was only being run 50% of the time.
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
|
||||
RegisterSignal(atom_target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, PROC_REF(on_requesting_context_from_item))
|
||||
|
||||
/datum/component/material_container/Destroy(force, silent)
|
||||
/datum/component/material_container/Destroy(force)
|
||||
retrieve_all()
|
||||
materials = null
|
||||
allowed_materials = null
|
||||
|
||||
Reference in New Issue
Block a user