Vekkt / ElvUI_BuffHighlight

Simple ElvIUI plugin for buff highlighting on raid frames
MIT License
4 stars 6 forks source link

Big performance hit #2

Closed Nercus closed 4 years ago

Nercus commented 4 years ago

I noticed an extreme performance hit due to the plugin. Addon CPU Usage shows it with a similar impact as Elvui itself.

I tried it with ElvUI and ElvUI_BuffHighlight enabled. That led to the same result. In Nyalotha I noticed an immense fps difference (around 25 fps).

If you need more info just tell me!

Vekkt commented 4 years ago

thanks for the feedback. Is there a specific scenario in which the performance drop occurs ? Like a specific boss or zone ?

Nercus commented 4 years ago

In Nyalotha it was around 25 fps in general. The fps loss happens even if im not infight. In Group Content (Waycrest Manor) it was around 7-10 fps. I always tried to only use ElvUI and BuffHighlight and no other addon.

Vekkt commented 4 years ago

Could you share the result of the profiler after a raid or dungeon encounter ?

Nercus commented 4 years ago

I couldn't find the results from yesterday and tried it again today. It got a bit better (but smaller raid now) but still uses a lot of ressources (compared to i.e. Details)

image

Nercus commented 4 years ago

I got some more and important info for you. I'm lookin into this problem for an hours now and noticed something. The FPS Drop is not only caused by the plugin also ElvUI has a bigger impactt if BuffHighlight is enabled.

I used the ElvUIDev addon to check to updates of the modules of ElvUI and noticed something. The BackdropTexture of unitframes gets update way to often. Even out of fight. For more look into it here some pictures:

Plugin Disabled (~1min;sitting in Garrison doing nothing;no group; started 30 secs after relog; no other addons enabled):

ElvUI Dev: image

Addon CPU Usage: image

Plugin Enabled(~1min;sitting in Garrison doing nothing;no group; started 30 secs after relog; no other addons enabled):

ElvUI Dev: image

Addon CPU Usage: image

Vekkt commented 4 years ago

Thanks for your investigation this is much appreciated. You're actually the first to report such a high performance impact of the plugin.

I'd like to remind you that, as stated in the description, this was at the start a plugin designed for my personnal use only, and I made it public in case others would be interested in. Thus, I did not really emphasize the work on such aspects of the plugin.

That being said, this performance issue should not remain. I have little time right now to work on the project, but at some point I will take a look at it. In the meantime, if you have some experience with Elvui and Lua, I would be more than happy to merge any fix you could find!

Nercus commented 4 years ago

Im not done with final testing, but i created a pull request. I changed it to update on COMBAT_LOG_EVENT_UNFILTERED. You can see the number how often each event fires in the pic below (you updated on FRAME_UPDATE): image

The fading options doesn't work anymore for now. I'll try to fix that. But the performance difference is huge. It would be possible to add an "every frame" update only if fading is checked (with a disclaimer) and a basic throttle or use the subevent "SPELL_PERIODIC" to check.

Nercus commented 4 years ago

Ok I was a bit too quick with my pull request. Sorry for that.

There are several new problems with the change. But the cpu usage looks wonderful :D

image

Vekkt commented 4 years ago

I'm also working on a simple fix, which has no effect on the fading feature. Doing some benchmarks in raid rn

Nercus commented 4 years ago

Hey, I came up with a pretty efficient solution. Unfortunately the fading option doesnt work, because it would need a const update to check if aura duration is sub the threshold. I still have some testing to do, but it looks pretty promising (besides the fade option)

Vekkt commented 4 years ago

I found time to work a bit on the addon. It gave it a new look, as well as tackling this performance issue.

Thats not perfect but I think there is a great improvement. And the fader still works BH_Profiling

Nercus commented 4 years ago

Due to major issues with the way i updated the uf i stopped the development on my version. The performance gain compared to your current version would be marginal. If you want to update your Addon even further you can try to update on CLEU SPELL_AURA_APPLIED/REMOVED and hook to PostUpdateColor. So you only update single frames and not always all the frames.

Thanks for your good work.