Destroy several sources of lag (#21422)

Destroys a ton of sources of lag:

- /obj/machinery/biogenerator/interact and
/obj/machinery/computer/rdconsole/attack_hand

Both of these call REF(src) constantly on their UI update, which also
happens constantly. Death by a thousand cuts

- /obj/machinery/button/ignition/attack_hand and
/obj/machinery/button/switch/holosign/attack_hand

Sleeps rather than timers, iterating the entire machinery list rather
than just storing the IDs we need at roundstart

- /obj/machinery/telecomms/update_icon and /obj/machinery/meter/process

Calling overlay updates WAY TOO MUCH. UpdateOverlays is a significant
overhead for the server at this point and the two of these combined are
responsible for a little over 20% of updates. They now should only
update overlays when necessary rather than every tick.

- NEW! /obj/machinery/disposal/proc/update and
/obj/machinery/portable_atmospherics/hydroponics/update_icon

These two were also offenders, worse than telecomms but better than
meters. They have also been brought into line.

- /mob/living/carbon/slime

Hard-del'd if grinded into slime extract less than two minutes after
being "born". Fixed by adding TIMER_DELETE_ME flag.

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Wildkins
2025-10-04 11:05:07 +00:00
committed by GitHub
co-authored by Matt Atlas
parent c553281d69
commit 5fec421dae
33 changed files with 526 additions and 284 deletions
+21 -20
View File
@@ -207,28 +207,29 @@
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
spawn(rand(20,60))
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!QDELETED(src))
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!QDELETED(src))
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
if(prob(50))
visible_message(SPAN_NOTICE("You hear something squeezing through the ventilation ducts."), range = 2)
sleep(travel_time)
if(prob(50))
visible_message(SPAN_NOTICE("You hear something squeezing through the ventilation ducts."), range = 2)
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
loc = exit_vent.loc
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
loc = exit_vent.loc
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
else
entry_vent = null
else if(prob(25) && isturf(loc))