mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-24 00:26:55 +00:00
a286843b18
The central loop calls the per-plate update for every visible plate ~100 times a second, and the plate's own throttle sat at the bottom of the function. Above it ran the whole classification: a GetAlpha call, a castbar IsShown, a cast lookup, and one or two libthrottle:Get resolutions -- all to work out which throttle applied, on plates throttled to 10fps that were going to return anyway. Forty plates makes that four thousand times a second. Add a cheap gate first, against the floor across all four throttle categories. Nothing that would have updated can be turned away by it -- a plate past its real throttle is necessarily past the minimum -- and the category-specific gate still runs after the classification, unchanged. Event flags are read before both and bypass both, as they did before. libthrottle:Get is not a lookup: it walks the saved variables, a defaults fallback and a preset table, and can build a "<category>_custom" key. Resolve the four categories in CacheConfig instead, where config changes already land, and read them from cfg on the hot path. That covers the two calls in the castbar branch as well. The castbar hide moves below the cheap gate, which is safe rather than merely tolerable: a plate showing a castbar sets isCastingNonTarget, which selects the castbar throttle -- one of the four the floor is derived from -- so it always clears the first gate and reaches the hide at its normal rate.