Thread: nUI5 CPU usage
View Single Post
07-21-13, 10:51 AM   #5
Belechannas
A Warpwood Thunder Caller
Join Date: May 2010
Posts: 86
Originally Posted by spiel2001 View Post
Out of curiosity, which profiler did you use to measure usage by function?
Heh.

I used the cave-man technique of commenting out the calls/hooks to OnUpdate in every nUI source file, one by one, and watching how the usage for nUI as a whole changed in the addon I mentioned (Broker_CPU Memory).

There were no noticeable changes, except for nUI_Button and nUI_UnitAura where it was dramatic.

I do suspect that at least nUI_Button could be recoded for improved performance more or less in isolation. I don't claim to have understood the whole thing (yet) but it is only about 1K lines of executable code, and it only does a handful of things. It might require giving up a few of the less important graphical embellishments, and fighting less against what the Blizzard code tries to do, but it would save a lot of duplication of effort (e.g. checking each action for range/usability/mana just after the Blizzard code has done exactly the same thing).

The "value-added" by nUI_Button, as far as I can tell, is pretty much the cooldown and debuff timer. It's hard to imagine that should require 6% of an i7 core, even in a less than perfect architecture.

Last edited by Belechannas : 07-21-13 at 10:55 AM.