oUF-wow / oUF

WoW AddOn - Unit frame framework.
MIT License
222 stars 58 forks source link

tags: Update element #635

Closed ls- closed 1 year ago

ls- commented 1 year ago

The element desperately needed some love.

The main goal of this PR was to increase the performance of the element. Tags were originally written with standard unit frames in mind, and they're fairly static. But with the introduction of the nameplates some performance issues reared their ugly heads. Unfortunately, it took me a while to get to this because everything was... still working 😅

There's generally two areas of improvement:

The overall performance of the element was increased by OVER 10 TIMES 🥳 Again, not 10%, but 10 times! 🤯 It'll be particularly noticeable in the areas where you get a lot of nameplates. How bad was that? Let's say, if you had 15-25 nameplates on the screen you could drop up to 20% of your FPS while turning/spinning your camera really fast. Yikes! 😨

I also cleaned the code up a bit, added data caching here and there, and gave various variables more self-explanatory and consistent names ☺

To adjust the update frequency, use oUF.Tags:SetEventUpdateTimer(timer).