Files
pfUI/modules
Brues 17291e4d9b nameplates: cut per-tick allocations in OnUpdate path
Six allocation sites firing per visible plate per central tick (or per
throttled OnDataChanged tick) were generating heavy GC pressure visible
in pfDebug's analyzer:

- IterDebuffs callback in PlateCacheDebuffs was a fresh closure per call.
  Hoisted to a module-level function with state in _pcdSelf / _pcdNow /
  _pcdId, matching the pattern the icon-grid IterDebuffs already used.

- string.format("%.2f", remaining) in UpdateCastbar fired every frame per
  active castbar. Factored into SetCastbarText helper that compares a
  rounded integer (centi- or deci-seconds) and only formats + SetTexts
  when the displayed value would actually change. lastTextTick reset
  alongside lastEndTime so back-to-back casts don't collide.

- guid.."target" concat in GetCombatStateColor hit Lua's string intern
  pool every call. Cached in guidTargetTokenCache, evicted alongside
  the other per-guid caches in NAME_PLATE_UNIT_REMOVED.

- plate.name:SetText was unconditional; moved inside the existing
  plate.cache.name change gate so it only fires on real unit changes.

- plate.level:SetText (string.format) was unconditional; gated behind a
  new (level, elite) cache so the format only runs on level-up or
  elite-state flips.

- C_NamePlate.GetNamePlates() poll every 0.5s allocated a fresh Lua
  table just to read its length. Replaced with a visiblePlateCount
  counter maintained event-driven from NAME_PLATE_UNIT_ADDED/_REMOVED.
2026-06-17 13:30:31 -05:00
..
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-06-08 11:33:05 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-27 20:35:15 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2017-07-19 10:35:01 +02:00
2026-05-27 23:11:44 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-31 13:13:48 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-27 20:35:15 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-29 22:56:12 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-31 13:18:20 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-29 22:56:12 -05:00
2026-05-29 22:56:12 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-05-25 18:50:53 -05:00
2026-06-07 02:39:53 -05:00