mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-08-01 10:21:34 -04:00
syncCreatureStealthVisuals() ran every frame and paid a mutex-locked getEntity() plus a dynamic_pointer_cast for every spawned creature, adding ~100k lock acquisitions and RTTI casts per second in crowded zones. Scan every 15th frame instead, read the unlocked main-thread entity map, and replace the dynamic cast with a type check and static_cast. Stealth flags flip rarely, so the ~150ms worst-case latency on the translucency fade is imperceptible.