Enhanced Raid Frames

Enhanced Raid Frames

940k Downloads

CPU usage very High when tracking alot buffs > FPS dropping crazy - small Fix

Pjspliff opened this issue ยท 7 comments

commented

Hi,
1. i just noticed if you have like 50+ Buffs&Debuffs to keep track of, your Fps will suffer greatly.
i changed the update timer in RaidFrameIndicators.lua to this:

-- Start update
RaidFrameIndicators.updateTimer = RaidFrameIndicators:ScheduleRepeatingTimer("UpdateAllIndicators", 0.85)

it helped a lot for my Fps but the displayed indicators will now have a 0,85s delay.

2. The other thing is that the usage is very high even when iam not in a raid/group.

Btw WoW v 8.1 and RFI v. 1.0.2
wow-raid-indicators-usage

commented

Heya sorry for being so long to get back to you. You are exactly right, and I'm working on a way to do this intelligently based on if you have "track decimals" checked. I want to default to the .85 like you have above

commented

Just glancing over the code, I see a triple-nested for-loop in the core of the code, which is what is causing the performance issue. Though I've only looked at it for a few minutes, I'm certain some of the nested for-looping can be reduced in exchange for a slightly higher memory footprint.

commented

@opensrcken thanks for taking a look! I agree with your assessment, and if I had more time I'd likely try to rewrite much of that core code to better optimized it. Though sadly most of my time is being taken up by my other big add-on project, Neuron, and work. If you want to take a crack at it, I'm more than happy to review any PRs you send my way for merger

commented

So I think I added a fix for this. I created a bucket to catch all "COMBAT_LOG_EVENT_UNFILTERED" events with a .1 sec window, and this bucket will automatically call "UpdateAllIndicators". Further, I can now decrease the refresh window on repeating timer to 0.9s as this timer is now only used for the countdown text.

This is a small change, but it effectively reduces the CPU workload of this addon by ~90%. So not bad for 2 lines of code.

commented

Hi brittyazel,
thanks for still updating this great addon!
I have tried this new Version 1.0.3 but i think it even consumes more CPU-Usage.

Here's a picure infight:
raidframeindicators-fps
(Maybe hardcoding buffs (SpellIds) with checkboxes, and if they fire to not scan them again until the duration is over, can reduce the cpu-usage or there may be addons who handle them already super efficient where one could get some ideas from.)

commented

So the cpu usage scales with the number of raid members, not the number of buffs.

The way it was coded before was that the entire raid frame was refreshed ever .1 sec no matter what. Now the way it is coded is that each combat log event can trigger the refresh, but since there are so many of them we group all the events into .1s buckets, and process them all together. So at the very worst the cpu usage should be nearly identical :-\ 7.55ms/s isn't unreasonable, but I'll try some more stuff to get the usage down

commented

Hi,
oh sorry i didnt realised that the cpu-time decreased a lot !
Keep up the great work :D