[MIRROR] Micro-optimize qdel by only permitting one parameter [MDB IGNORE] (#25889)

* 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.

* Micro-optimize qdel by only permitting one parameter

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-29 14:41:12 +00:00
committed by GitHub
co-authored by Mothblocks
parent 24ff84cc24
commit 067188d366
116 changed files with 126 additions and 124 deletions
@@ -13,7 +13,7 @@
START_PROCESSING(SSmachines, src)
/datum/component/netpod_healing/Destroy(force, silent)
/datum/component/netpod_healing/Destroy(force)
STOP_PROCESSING(SSmachines, src)
var/mob/living/carbon/player = parent
@@ -28,7 +28,7 @@
previous_factions.Add(player.faction)
player.faction |= npc_factions
/datum/component/npc_friendly/Destroy(force, silent)
/datum/component/npc_friendly/Destroy(force)
. = ..()
var/mob/living/player = parent