Replace moveToNullspace in decal Destroy() to loc = null -- Saves 0.11s of init time (#71706)

This calls Exited(), Entered(), etc etc etc etc, and it is not necessary
for this. Was 119ms, now 9.
This commit is contained in:
Mothblocks
2022-12-17 02:37:50 -08:00
committed by GitHub
parent 75439c71f2
commit 0f3a11f5bd
+4 -1
View File
@@ -62,5 +62,8 @@
var/turf/T = loc
T.RemoveElement(/datum/element/decal, icon, icon_state, dir, null, null, alpha, color, null, FALSE, null)
#endif
moveToNullspace()
// Intentionally used over moveToNullspace(), which calls doMove(), which fires
// off an enormous amount of procs, signals, etc, that this temporary effect object
// never needs or affects.
loc = null
return QDEL_HINT_QUEUE