mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
73f4999004
UNIT_HEALTH/UNIT_MAXHEALTH register through RegisterUnitEvent for mark1 through mark8, so the scanner stops waking for every unit in the world. Eight tokens is past the four other clients accept; ClassicAPI takes as many as it is given, so this file is fork-only. That makes arg1 always one of eight known strings, so the handler looks the row index up in a table built alongside markerTokens, instead of running string.match + tonumber -- which allocated a capture and parsed it on every health tick of every marked unit. The fallback poll was the larger cost and the filtering did not touch it: a full eight-row rebuild once a second for the whole session, whether or not a marker existed anywhere. Raid markers are a group feature, so the scanner now watches PARTY_MEMBERS_CHANGED / RAID_ROSTER_UPDATE and creates or cancels the ticker with group membership -- outside a group no timer is queued at all, rather than one waking every second to return early. It is deliberately not keyed on a mark being visible: a marker set on a unit that is out of range shows no row, and that is precisely the case the poll exists to catch. The mark-token capability probe at the top goes too. ClassicAPI is a hard dependency, so the tokens are always there to resolve.