Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-26-18, 10:56 AM   #1
Blooblahguy
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 18
oUF performance

Hello,

I'm finding that oUF this expansion has been a huge cpu hog compared to other expansions. I think in large part this is due to the way that blizzard has changed it's lua implementation and how we need to fetch Auras and CombatLog entries now. However I'm wondering if there are plans to implement performance improvements into the oUF core? I'd be happy to submit merge requests on the official github in this effort, but I'm not sure if that steps on toes or if those are largely ignored with such a large userbase. I'll put some performance notes below that I see oUF having problems with.

Things oUF could do better for much faster function cycles:
* Localizing common functions in each script. Things like UnitAura / UnitBuff / UnitDebuff / UnitReaction / UnitThreatSituation and so on. There are easily 100 functions that could be localized and localized function references are a minimum of 30% faster (i've profiled in some cases up to 300% faster)
* Localizing variables outside of for loops, also a massive performance increase
* Creating tables or table templates(key sizing) outside of loops and just updating their reference inside of loops
* Result memoizing - I believe this is possible in WoWs implementation, but storing some function results so that when the same function parameters are given, it simply returns the same result as the last time rather than recalculating. This can be useful for common calls such as UnitName or internal functions that use unique string names as input. `unit` changing frequently might make this difficult to implement on things like nameplates or raid frames. Food for thought.
* I've noticed that OnShow can result in all of a frame elements forcing an update, which seems likely unecessary and a huge resource hog for frames that hide and display frequently.
* There are also OnUpdate script in a number of default elements which do a lot of calculation that I think should be revisited
* Default blizzard addons tend to continue to run even when hidden and their main driver has events unregistered. Once their frames are created they have subevents registered and still seem to be firing an unbelievably high amount. I think when we spawn raid frames, we should DisableAddon on Blizzard_CompactRaidFrames, on nameplates DisableAddon Blizzard_Nameplates, so on so forth. I've been profiling these frames and they are absolutely decimating performance when they should be disabled. I was finding that addons like WAs were holding up > 3s of cpu time over the course of a raid fight, but that just CompactRaidFrame_Unit1 was upwards of 80s. Same goes for nameplates.

BFA has been a poorly optimized expansion, Uldir has been a poorly optimized raid, and these days more than ever people are running crappy addons or WAs that eat up a ton of CPU usage. I think oUF can help fix some of that. I have 3 addons that all use oUF and the 3 of them together are starting to get kinda cpu-heavy just from their oUF elements.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF performance


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off