mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
Tweaks some procs in garbage to make profiling it better (#26210)
Having soft delete overhead and queued hard delete overhead merging in the profile was confusing me.
This commit is contained in:
committed by
duncathan salt
parent
0f0d016fcf
commit
d688553d4c
@@ -113,7 +113,7 @@ SUBSYSTEM_DEF(garbage)
|
|||||||
var/time = world.timeofday
|
var/time = world.timeofday
|
||||||
var/tick = world.tick_usage
|
var/tick = world.tick_usage
|
||||||
var/ticktime = world.time
|
var/ticktime = world.time
|
||||||
del(A)
|
HardDelete(A)
|
||||||
tick = (world.tick_usage-tick+((world.time-ticktime)/world.tick_lag*100))
|
tick = (world.tick_usage-tick+((world.time-ticktime)/world.tick_lag*100))
|
||||||
|
|
||||||
if (tick > highest_del_tickusage)
|
if (tick > highest_del_tickusage)
|
||||||
@@ -140,10 +140,10 @@ SUBSYSTEM_DEF(garbage)
|
|||||||
A.gc_destroyed = GC_QUEUED_FOR_QUEUING
|
A.gc_destroyed = GC_QUEUED_FOR_QUEUING
|
||||||
|
|
||||||
/datum/controller/subsystem/garbage/proc/Queue(datum/A)
|
/datum/controller/subsystem/garbage/proc/Queue(datum/A)
|
||||||
if (!istype(A) || (!isnull(A.gc_destroyed) && A.gc_destroyed >= 0))
|
if (!isnull(A) || (!isnull(A.gc_destroyed) && A.gc_destroyed >= 0))
|
||||||
return
|
return
|
||||||
if (A.gc_destroyed == GC_QUEUED_FOR_HARD_DEL)
|
if (A.gc_destroyed == GC_QUEUED_FOR_HARD_DEL)
|
||||||
del(A)
|
HardDelete(A)
|
||||||
return
|
return
|
||||||
var/gctime = world.time
|
var/gctime = world.time
|
||||||
var/refid = "\ref[A]"
|
var/refid = "\ref[A]"
|
||||||
@@ -155,6 +155,10 @@ SUBSYSTEM_DEF(garbage)
|
|||||||
|
|
||||||
queue[refid] = gctime
|
queue[refid] = gctime
|
||||||
|
|
||||||
|
//this is purely to seperate things profile wise.
|
||||||
|
/datum/controller/subsystem/garbage/proc/HardDelete(datum/A)
|
||||||
|
del(A)
|
||||||
|
|
||||||
/datum/controller/subsystem/garbage/proc/HardQueue(datum/A)
|
/datum/controller/subsystem/garbage/proc/HardQueue(datum/A)
|
||||||
if (istype(A) && A.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
|
if (istype(A) && A.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
|
||||||
tobequeued += A
|
tobequeued += A
|
||||||
|
|||||||
Reference in New Issue
Block a user