mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 03:32:28 +00:00
The way """we""" currently do it, each time you want to walk the queue you're forced to make a copy in memory of the whole thing There's no real reason to want this, so it seems best to just avoid it entirely. It creates a TON of usage for no reason, and also risks a lot of overtime since you can't really batch a list copy like that. So instead let's just iterate over the length of the queue, constant rather then O(N) time. Similarly, rather then using an associated list in the form queue[ref] = gc time, we could store queue entries in what amounts to a tuple. This means no associated list stuff, so the operation of queuing becomes cheaper, and pulling gc time similarly goes from O(log n) to constant time I stole this work from myself and mso, tg pr 55595 I'm pring it here because I keep seeing affected complain about the garbage subsystem and he refuses to do it himself. No I don't have an ego problem I swear