Hekili Priority Helper

Hekili Priority Helper

50M Downloads

v11.0.5-1.0.13 and Later: Performance Optimization Concerns

Zayndrix opened this issue ยท 36 comments

commented

Before You Begin

  • I confirm that I have downloaded the latest version of the addon.
  • I am not playing on a private server.
  • I checked for an existing, open ticket for this issue and was not able to find one.
  • I edited the title of this bug report (above) so that it describes the issue I am reporting.

Describe the Issue

Ever since the latest patch i have been getting severe fps drops when putting the update period down. I always played with the update period in/out of combat on lowest = 0.05. But ever since the latest update my fps gets shattered by this. Immediately drops when i toogle the update period on.

I have used Hekili for some time now and never had low fps with it before now. I have a Ryzen 7800X3D and a 3070 TI with 64 GB RAM 6000mhz.

Thank you for the great work on Hekili!
before on
After on

-Anders

How to Reproduce

its very simple to reproduce just load into the game toggle the update period on and the drop will be instant.

Player Information (Link)

https://pastebin.com/8Yefrbr3

Error Messages (Link)

https://pastebin.com/8Yefrbr3

Additional Information

No error message from BugSack/BugGrabber

Contact Information

Zayndrix

commented

updated to the latest version (v11.0.5-1.0.15a)
image
https://pastebin.com/pxLhcUc0

commented

It's very noticeable delay in my system when i turn it on and losing 30-40 frames seems like quite a bit? Not trying to be rude, just saw quite a performance difference in my system since last time i used Hekili. Just trying to help! :)

Love the Addon

-Anders

commented

image

I'm likely to take those options away or replace them.

An update period of 0.05 seconds means every time the addon finishes generating recommendations, it will wait 50ms and then start generating recommendations again. That can be as much as 20 updates per second regardless of whether anything has happened that would result in a change in recommendations.

The addon already forces new recommendations when critical events occur. With the default settings (i.e., both of these unchecked), that usually results in needing between 2 and 3 updates per second. You're asking the addon to do 5 to 10x more work just because I've exposed those options that are kind of outdated to start with.

commented

I was just wondering since i always used the lowest settings before. I obviously dont toggle it on atm since its messing with my frames.

I removed some code that basically inversely scaled the time the addon was allowed to use per frame with your framerate. You may actually benefit from turning on Set Update Time and lowering the limit there. I'd be interested to know if you find a value that is more performant at your framerates.

commented

I did notice this myself today after updating as i have the custom update period quite low and there was a noticeable fps drop compared to previous versions. I turned off the custom times and its fine now.

commented

It's very noticeable delay in my system when i turn it on and losing 30-40 frames seems like quite a bit? Not trying to be rude, just saw quite a performance difference in my system since last time i used Hekili. Just trying to help! :)

Love the Addon

-Anders

Go back to an old version and rerun the test?

commented

You can turn it off then. You're forcing the addon to run more. The default setting works significantly better after the latest update anyways.

Other than that, I ran lots of testing with combat period on both the minimum and the default, they weren't released any different for me in raid and I've got a worse CPU. Are you for sure able to pinpoint it to this addon? Disable everything else, try some CPU profiling?

commented

The Addon even without the Update period runs vastly better on V11.05-1.0.10. No latency or fps drops felt at all, whereas with the new addon my system feels very high in latency and low in fps.

: https://streamable.com/4j34ph

You can clearly see the difference in performance in terms of fps and latency. Compared to the newer version its completly stable at 162 and feels super smooth to play WoW. :)

commented

I understand how the update frequency makes the addon run more. I was just wondering since i always used the lowest settings before. I obviously dont toggle it on atm since its messing with my frames.

Yes, it's extremely simple for me to recreate i turn on update period and my fps drops 30%. I can send a short recording of it if needed. :)

-Anders

commented

I didn't say recreate. Can you try using something like the "addon cpu usage" addon and profiling yourself with the setting at both default and lowest and post screenshots?

I'm suggesting there could be more than 1 cause, like maybe a weakaura that's freaking out because of it or something.

commented

Yes ofcourse. I actually did a clean install of WoW and all addon settings to see if it might be something else. But i turned off all addons except the two here is the pics and a link to a video aswell, just to be safe you understand/see my issue. link to video: https://streamable.com/3r05mb

Thank you
-Anders
Addon ON

Addon OFF

commented

It's using like 5% more cpu time with the setting on, that's barely anything. And you're still well above 120fps? I'm guess I'm not sure what I'm supposed to be seeing in the video.

@Hekili ?

commented

And i completely understand what I'm asking the addon to do, i have read through what all the settings does. I love optimizing in all aspects, so probably why i feel it a lot. I'm using your settings aswell syrif, they are great for high keys in mythic+. It's just such a big change for my fps/latency sensitive ass that i had to make a ticket if anybody else had the same issue. :)

commented

It's just such a big change for my fps/latency sensitive ass that i had to make a ticket if anybody else had the same issue. :)

It's definitely a good time to provide feedback, since there were significant changes. I will look at adding another optimization option that tunes update time based on framerate that is turned off by default. Essentially, what has changed is that the addon was previously capped to 60% of your "frame time" (1 / FPS), so you may be feeling spikes now that the default update time is ~15ms.

At 100 FPS, your frames are generated every 10ms, so it was previously allowed to use 6ms per frame. If you're forcing 20 updates per second and up to 15ms of work per frame, then you're potentially experiencing 20 frames that are delayed by ~50%.

tl;dr -- You may benefit from lowering the Update Time. You are destroying yourself by lowering the Update Period.

commented

Thank you for the help!

I will be using the V11.05-1.0.10, since the default settings (without anything toogled on/off) also feel significantly better in combat than in the newer version! So, i will recommend that if people are noticing issues = go back to V11.05-1.0.10. I will try again when the new update comes out.

Thank you so much for the great Addon!

commented

Thank you for the help!

I will be using the V11.05-1.0.10, since the default settings (without anything toogled on/off) also feel significantly better in combat than in the newer version! So, i will recommend that if people are noticing issues = go back to V11.05-1.0.10. I will try again when the new update comes out.

Thank you so much for the great Addon!

Did you try actually playing the new version with the setting turned off? In all my testing, that feels better than old versions with any setting ever did.

Particularly, did you try in raid where you're going to have much lower fps even without the addon?

commented

Yes, i played two bosses on heroic with the new addon it felt it gave me 30/40% less fps and much higher latency than the V11.05-1.0.10. But i can't tell u if it happened before the new update since i played with V11.05-1.0.10 before aswell. I can say that the Alpha that you guys released recently also felt worse in terms of fps. Since i used that for a bit aswell. :)

commented

Yes, i played two bosses on heroic with the new addon it felt it gave me 30/40% less fps and much higher latency than the V11.05-1.0.10. But i can't tell u if it happened before the new update since i played with V11.05-1.0.10 before aswell. I can say that the Alpha that you guys released recently also felt worse in terms of fps. Since i used that for a bit aswell. :)

I'd suggest something else is going on then, because nothing in that alpha would have any effect on that unless you were running 10 hekili macro commands a second. The only difference in the alpha was new chat commands, I believe.

I'll try to do some more testing later too.

commented

I dont use anything except the low update frequency and update time previously. But what i can say is V11.05-1.0.10 is working flawlessly with everything also the low update freq and low update time :)

commented

You may be interested to see /dump HekiliEngine.threadUpdates -- it is only updated in combat so you'd want to bang on a dummy a bit, but you can see how much CPU time is being wasted with that low Update Period setting. You can reset this data with /run HekiliEngine.threadUpdates = nil (i.e., if you change the Update Period setting and want clean data based on the change).

The following scenarios are with my character simply autoattacking a single dummy.

0.05 Update Period
 [06:39] Dump: value=HekiliEngine.threadUpdates 
 [06:39] [1]={ 
 [06:39]   meanClockTime=13.638799401001, 
 [06:39]   meanWorkTime=13.341107062336, 
 [06:39]   totalWasted=45.102199971676, 
 [06:39]   peakWasted=15.085399985313, 
 [06:39]   peakFrames=2, 
 [06:39]   peakWorkTime=22.833800017834, 
 [06:39]   updates=14358, 
 [06:39]   firstUpdate=261163904.0873, 
 [06:39]   updatesPerSec=17.878835084574, 
 [06:39]   peakClockTime=39.698799997568, 
 [06:39]   meanWasted=0.0058127639092449, 
 [06:39]   meanFrames=1.0289733946232 
 [06:39] } 

It takes 13.3ms of processing time to complete one update loop (reset all displays and generate all recommendations). This usually occurs in a single frame, but is occasionally split across two frames. There are 17.9 updates per second generated with these settings.

13.3 * 17.9 = 238ms

Default Update Period (unchecked)
 [06:45] Dump: value=HekiliEngine.threadUpdates 
 [06:45] [1]={ 
 [06:45]   meanClockTime=14.440865853332, 
 [06:45]   meanWorkTime=13.63379430886, 
 [06:45]   totalWasted=15.012199997902, 
 [06:45]   peakWasted=15.012199997902, 
 [06:45]   peakFrames=2, 
 [06:45]   peakWorkTime=17.446100026369, 
 [06:45]   updates=492, 
 [06:45]   firstUpdate=262113594.9388, 
 [06:45]   updatesPerSec=2.2096720117722, 
 [06:45]   peakClockTime=38.752999991179, 
 [06:45]   meanWasted=0.03909427082787, 
 [06:45]   meanFrames=1.0508130081301 
 [06:45] }

You can see that the average work time is still roughly the same (13.6ms), but updates per second is down to 2.2. That's 1/8th the CPU usage.

This trusts the addon to respond to events and generate updates when there's a reason to do so.

Overall, this would give you:

  • Updates every ~455ms (1000 / 2.2 = 454.5ms)
  • CPU Time of 29.9ms per Second (13.6 * 2.2 = 29.9ms)
  • 2.2 frames delayed by ~4.5s each second (at 100 FPS)
0.2 Update Period, 10ms Update Time
 [06:53] Dump: value=HekiliEngine.threadUpdates 
 [06:53] [1]={ 
 [06:53]   meanClockTime=22.813422177468, 
 [06:53]   meanWorkTime=13.84230000009, 
 [06:53]   totalWasted=0, 
 [06:53]   peakWasted=0, 
 [06:53]   peakFrames=2, 
 [06:53]   peakWorkTime=16.079900026321, 
 [06:53]   updates=248, 
 [06:53]   firstUpdate=262769032.6066, 
 [06:53]   updatesPerSec=4.5687709279071, 
 [06:53]   peakClockTime=31.386500000954, 
 [06:53]   meanWasted=0, 
 [06:53]   meanFrames=2 
 [06:53] }

Here, you can see the actual work time (meanWorkTime) remains roughly the same at 13.8ms, and now we are seeing 4.6 updates each second. Average number of frames taken to generate recommendations has increased to two (10ms in the first frame, 3.8ms in the second frame). This means responsiveness takes a small hit vs. default settings, since splitting the work across frames has moved the meanClockTime -- the actual time between the start of generating recommendations and displaying them -- to 22.8ms (+8.4ms).

Overall, this would give you:

  • Updates every ~200ms (1000 / 4.6 = 217ms)
  • CPU Time of 63.5ms per Second (4.6 * 13.8ms)
  • Theoretically, no frame delays since the work per frame is lower than the frame rate

Finally, these Performance options were previously overridden based on your actual frame rate. The calculation was:

  • min( ( 1000 / frame_rate_since_last_update ) * 60%, maximum_update_time )

This means you could set Maximum Update Time to 100ms, but if your framerate was high, the 60% frame cap would come into play:

  • At 100 FPS: Lowest value of ( 1000 / 100 ) * 60% = 6ms vs. 100ms.
  • At 60 FPS: Lowest value of ( 1000 / 60 ) * 60% = 10ms vs. 100ms.
  • At 30 FPS: Lowest value of ( 1000 / 30 ) * 60% = 20ms vs. 100ms.

With that setting in place, Maximum Update Time of 100ms would only really occur if you were at or below 6 FPS. Which...well, I hope not.

If you're truly having worse performance with the changes, you probably want:

  • Turning off Set Update Period or setting the update period values closer to defaults
  • Checking Set Update Time and reducing the value to somewhere between 60-100% of ( 1000 / frame_rate ) .

Hopefully, this is helpful information in terms of how to actually optimize with the existing settings. I have plans to reimplement some of the features that were pruned, probably with something like:

  • Target FPS [ 100 ]
  • Frame Utilization [ 90% ]
  • Minimum Update Allowance [ 8ms ]
  • Maximum Update Allowance [ 15ms ]

The idea is that the Performance settings would work more like you expected previously, but it would keep the update time allowance within reasonable bounds.

  • 100 FPS: ( 1000 / 100 ) * 90% = 9ms allowance (within bounds)
  • 60 FPS: ( 1000 / 60 ) * 90% = 15ms allowance (within bounds)
  • 30 FPS: ( 1000 / 30 ) * 90% = 30ms allowance (capped to 15ms)
commented

That sounds absolutely incredible! I have been playing competitive eSports for a long time. Tournaments in LoL and cs examples. So, latency is massive for me! The smoothness of WoW is what drags me to the game. I would love to be close to the 130-162 fps in mythic+ situations which is possible with the earlier versions. Obviously i know that WoW has its own performance issues this patch especially. So, the suggested settings sound like a very good idea, if possible. Im nowhere near as smart as you guys with coding etc. But if you can make it so it feels like only like a slight decrease in performance, it would be even better to maximize DPS! I will play around with the settings in future patches, since its sadly too much of a drop in fps with the new patch, even with the settings pushed to the max (1sec response) it still feels noticeably worse than the older hekili patches, i sadly dont know why.

Big Kudos for the responses, great to see its active! <3

-Anders

commented

That sounds absolutely incredible! I have been playing competitive eSports for a long time. Tournaments in LoL and cs examples. So, latency is massive for me! The smoothness of WoW is what drags me to the game. I would love to be close to the 130-162 fps in mythic+ situations which is possible with the earlier versions. Obviously i know that WoW has its own performance issues this patch especially. So, the suggested settings sound like a very good idea, if possible. Im nowhere near as smart as you guys with coding etc. But if you can make it so it feels like only like a slight decrease in performance, it would be even better to maximize DPS! I will play around with the settings in future patches, since its sadly too much of a drop in fps with the new patch, even with the settings pushed to the max (1sec response) it still feels noticeably worse than the older hekili patches, i sadly dont know why.

Big Kudos for the responses, great to see its active! <3

-Anders

One thing I just came across with someone else, even if you disable the setting, it still registers as 0.05.

Can you try installing the newest version, manually setting the timer thing to 0.25, then disabling it and let me know if that's any different for you? Or leave it enabled, and do the same test you originally did, but just slide the timer around from 0.05 to 0.25, and try a /reload too

edit: after some testing, try exactly this. (there are new settings coming anyways, but just to see)

  • Update to new version
  • Refresh at 0.05 like you used to use, and also set the update time to like 10 or something
  • Game should feel bad
  • Set the slider to 0.25, type /reload
  • Game should feel good???
commented

image
this is the latest version of the addon, i used the exact same settings described in the post below. something is not working right if i'm correct. and yes, i'm experiencing fps drops as well. 7800x3d, 4070 super, 32GB 6000mhz CL30

commented

There are more performance updates in the works. But it would also help to have a snapshot so we can see your settings.

commented

https://pastebin.com/JdunaKqW here is the snapshot

commented

What is the context to that, what are you doing? What are your other addons at?

Also, does it feel like it's better now?

commented

What is the context to that, what are you doing? What are your other addons at?

Also, does it feel like it's better now?

Context is: fps drops and addon usage remained the same. and it feels the same.
that's all of my addons. i play with minimum of addons and wa's
image

commented

I guess my context question was more like, was that data from standing alone in a forest or from doing a dungeon or raid :P

Thanks for the full image.

commented

I guess my context question was more like, was that data from standing alone in a forest or from doing a dungeon or raid :P

Thanks for the full image.

ohh :D sorry i got you now :) it's durring combat and doing the addon's suggested rotation on 5 target dummies in Dornogal

commented

Ok! I will compare, but this newest version ought to be significantly better for everyone. And just to make sure, last question, have you tried it with the CPU profiler turned off?

Actually running the profiler which gets that data for you is very expensive.

commented

with CPU profiler disabled it's better, yes, but still if we look at FPS lows:
image

note: green number - current fps. next numbers are: frametime / average fps / 1% low / 0.1% low
you can see fps drops down to 50-70s, almost every GCD i'd say.
what i noticed: frost dk rotation uses less CPU and makes fps drops less than assa rogue and fire mage rotations. any way to make it better?

commented

Not quickly, no. You chose 2 of the most complex specs to play lol. For what it's worth, you have a significantly better CPU than me and I am not experiencing that level of frame drop unless I'm in raid, which applies to pretty much everyone regardless of Hekili.

on sin rogue on the newest version, I have like 140-150 fps standing still, and 100-120 fps doing rotation on AoE dummies with addon going.

I am still investigating performance improvements for specifically Sin and Frost, though.

Does this issue happen on any other classes/specs besides the 3 you listed?

commented

i don't really play other classes. out of 3 i mentioned - frost dk works the best in terms of fps. this is what it looks like when i'm doing frost dk rotation, just for comparison:
image
and FPS with CPU profiler disabled:
image
there are still some fps drops / microstutters, but much better %lows and it feels better obviously :)
forgot to mention: i always cap my fps using RTSS at 150 for better frametimes and smoothness. uncapped my pc can handle 250+ in combat and 600+ standing in nowhere. but my monitor is 155hz, so i cap at 150 to avoid screen tearing

commented

thanks for your work on trying to optimize the addon, i'll leave my feedback when newer versions come out :) i hope for performance improvements since i love the addon because it makes my life easier <3

commented

Just leaving my feedback. Updated to the latest version v11.0.5-1.0.16 and Addon CPU usage shows the same results. (around 58-60ms for assa rogue / 30-32ms for frost dk).

commented

That's not likely to change. It's a spec specific issue.