WeakAuras

WeakAuras

206M Downloads

A way to disable "Every Frame" (%c) via code/condition

Causese opened this issue ยท 4 comments

commented

Is your feature request related to a problem? Please describe.
I made a weakaura and I want to make every frame optional via custom options to give the user the choice to disable it since it might be expensive. e.g the choice to display a timer

this case mostly happens when you want to display multiple timers (one via tsu ("timed"), one via %c)
or when you use progressType = "static" since you want to base the progress off that value and want an additional timer (%c)

Describe the solution you'd like
a function and/or condition to "halt"/"continue" every Frame/%c

Describe alternatives you've considered
making two auras with only one having every frame, I don't know of any other solution

Additional context

commented

Have you actually measured that it would make a difference? I certainly doubt that it would.

commented

I don't understand what WA could do here that you couldn't do yourself, with the exact same performance.

commented

how so?
a TSU that only uses progressType = "static" with %c every frame should be more expensive than a TSU without it

but yeah idk how much of a difference that makes, was always told to stay away from it if it can be avoided.

if you're saying that a TSU that's displaying a timer via progressType = "timed" has no further performance loss with a %c every frame box because it share's the FRAME_UPDATE? then that's something I didn't expect :'D

for some reason I assumed that it would double

commented

so if the text of a aura is updated, %c is almost the same code path as %p in most cases. As both update each frame. Obviously running the custom text function has some cost.

IIRC, I added a small optimization where a %p using aura skips the each frame update if the state has no actual timed progress.

But again, I really doubt that you could measure the difference, as long as your %c function is dead simple. If you can demonstrate a real need for it, we can consider what to do, but you need to demonstrate that first..