Files
Bubberstation/code/controllers/subsystem/processing/aura.dm
MrMelbert af2144f2dd Small optimization for Aura Healing (#82674)
## About The Pull Request

- Makes use of the byond internal optimization for `view` to speed up
aura healing a tiny bit.
- In case you didn't know, byond has an optimization for `view` which
speeds up iterating over objects in view if you provide it a type. This
use of a ternary (likely) prevented this optimization from kicking in,
and since worst-case we're doing view(7) it can add up.
- Test case: 2 staff of Ascelpius users surrounded by 15 humans and 15
random objects constant being damaged. ~8 minutes of testing.

   - Profile:
```
/datum/component/aura_healing/proc/heal_old   0.789        6.590        6.596        0.000         4076
/datum/component/aura_healing/proc/heal_new   0.682        6.443        6.442        0.000         4081
```

- Generalizes `SSaura_healing` to `SSaura`, makes "damage aura"
component (which is totally 99% copied from "healing aura" but that's
for another pr) use it as well

## Changelog

🆑 Melbert
refactor: Staff of Healing should perform slightly better. 
/🆑
2024-04-16 17:27:45 -06:00

6 lines
226 B
Plaintext

/// The subsystem used to tick auras ([/datum/component/aura_healing] and [/datum/component/damage_aura]).
PROCESSING_SUBSYSTEM_DEF(aura)
name = "Aura"
flags = SS_NO_INIT | SS_BACKGROUND | SS_KEEP_TIMING
wait = 0.3 SECONDS