LunaUnitFrames icon indicating copy to clipboard operation
LunaUnitFrames copied to clipboard

In raid: lagged out down to 1FPS - game crash version 4.0

Open lvangh opened this issue 4 years ago • 38 comments

When I entered AQ40 and people came online from being logged for buffs, the FPS kept dropping and dropping and by the time all 40 were logged in the game locked up and I had to alt-f4 it. Unfortunately I didn't record or stream.

lvangh avatar Nov 23 '20 01:11 lvangh

Similar thing happened to me but not as quickly. I noticed some FPS drops immediately especially when killing multiple mobs like AQ40 warrior packs. We did AQ40 and then BWL and the performance kept degrading over the raid. In BWL suppression room I was in single digit FPS and had to disable Luna and reload UI. After that everything worked fine.

The cause is not LUA errors because that's something I would have seen. The only hint for finding the issue is that hitting multiple mobs caused FPS drops and overall FPS kept getting worse over time. I was using 4.020 Beta.

213983770 avatar Nov 23 '20 08:11 213983770

I have seen this happening aswell in a long raid session (AQ40 + BWL). However i can give no estimate for a fix as it will be difficult to track down. A workaraund for the moment is a reload of the UI.

Aviana avatar Nov 24 '20 17:11 Aviana

I encountered a similar problem in the last AQ40 too and suspected this addon. I'll do some very basic profiling of all functions and frames reachable from the LUF object in tomorrow's raid. Hopefully something obvious pops up.

coolmodi avatar Nov 24 '20 18:11 coolmodi

This also happened to me, 2-3 times. When i switched back to the old 3.0 version it stopped happening.

whyudothis5656 avatar Nov 25 '20 10:11 whyudothis5656

I have seen this happening aswell in a long raid session (AQ40 + BWL). However i can give no estimate for a fix as it will be difficult to track down. A workaraund for the moment is a reload of the UI.

Think youll be able to find it? Pretty happy with the 4.0 changes but had to disable for my raid because i kept dropping from 140 fps to 5-10.

whyudothis5656 avatar Nov 25 '20 10:11 whyudothis5656

Last Sunday I had it stuck at super low fps until reload after Viscidus. Today's BWL it only dropped to slideshow fps in fights involving a lot of incoming AoE damage, but it always went back to normal afterwards. We also did the shark thing in Azshara, and as soon as the shark did his AoE it would destroy my fps until everybody was full HP again. Firemaw was also unplayable, while the other 2 drakes ran with only minor stuttering.

Over a time of 272 sec I gathered following data in BWL, including some pulls in the suppression room where it was simply unplayable. Note that profiling every frame has massive overhead, which is why the fps is so low even on average! Times are all ms.

Time expired: 271639.77 Frames: 6269 Frametime Avg: 43.33 Used by addons: 21662.83, Avg per frame: 3.46, Max per frame: 160.74

Addon Total Avg Max Frame
LunaUnitFrames 12098.39 1.93 100.94
AtlasLootClassic 3963.36 0.63 6.53
WeakAuras 1580.67 0.25 3.72
Details 1355.4 0.22 87.71

I omitted all the other addons that had completely irrelevant CPU usage. Disabling LUF also improves fps a lot, so I guess it's safe to say there is a problem somewhere.

Function Time used Calls
LunaUnitFrames.frameIndex.raid4.1.tags.castBar.right.UpdateTag 3500.07 2439280
LunaUnitFrames.db.callbacks.events.OnProfileCopied.KEY:table: 00000274D9888EB0.oUF.TagsWithHeal.Methods.casttime 831.45 2439280
LunaUnitFrames.frameIndex.raid4.1.tags.healthBar.center.UpdateTag 328.82 92448
LunaUnitFrames.db.callbacks.events.OnProfileCopied.KEY:table: 00000274D9888EB0.oUF.TagsWithHeal.Methods.healerhealth 245.89 102017
LunaUnitFrames.db.callbacks.events.OnProfileCopied.KEY:table: 00000274D9888EB0.oUF.Tags.Methods.curpp 135.62 31414
LunaUnitFrames.db.callbacks.events.OnProfileCopied.KEY:table: 00000274D9888EB0.oUF.Tags.Methods.curhp 129.65 119028
LunaUnitFrames.db.callbacks.events.OnProfileCopied.KEY:table: 00000274D9888EB0.oUF.Tags.Methods.maxpp 113.85 30406
LunaUnitFrames.frameIndex.mainassisttarget.1.Range.Override 62.32 52749

These are the top CPU consuming functions found when traversing the LUF object. Functions that can't be reached that way won't show up here! The function name is simply the first place a function was found, KEY: means the key of a table was a table used to go deeper.

Edit: The update function used for the castbars consumes by far the most time. First glance at the code I don't really get how it's all connected, but 2.4 million times seems a lot, that's 389 times avg per frame, or nearly 900 every 0.1 sec, which seems to be the intended interval. Don't think that's the (only) problem causing insane fps losses for me though, guess that will be harder to find :/

Still, if there aren't even castbars active it maybe shouldn't update them 9000 times per second. And whatever the UpdateTag function in that case is also costs way more CPU time than the actual casttime function used to update the tag. I'll remove all tags on all disabled bars and frames and check if that makes any difference next raid.

coolmodi avatar Nov 26 '20 00:11 coolmodi

Definitely experiencing this as well. Went from AQ40 to BWL and FPS didn't quite drop down to 1 FPS, but I was getting some serious lag. Reload as mention did fix it, but happening in combat as a tank, a reload isn't the most ideal situation to be in. I was probably also missing some ability usage on GCD as a result.

boktai1000 avatar Nov 26 '20 16:11 boktai1000

Yes, casttime (which is an onUpdate) & tags with healing take their toll on performance. However that does not explain the drop to 1 fps. Luna 3 used unthrottled onUpdate on ALL tags and you can see that its far worse than Luna 4. You can test the impact by unlocking and casting. Its also more the burst of code at the start / end of a cast. So the search continues.

Aviana avatar Nov 27 '20 23:11 Aviana

Just updated from 3.x version and got shocked with lagging in AV 40x40 battle. Reminded me good old times with slow computer and 512 mb of RAM onboard. Well it wasn't 1 FPS but rest of bg i was healing with standart blizzard UI.

PS also buff timers on NPC/other players disappeared

mamonthfully avatar Dec 02 '20 11:12 mamonthfully

I tried finding the reason for it some more, but even with just healthbars for raidframes, no tags, no squares, no feature active, it causes single digit fps in some situations and overall stuttering most of the time in a raid. Disabling raidframes but keeping the addon active results in no (obvious and unexpected) fps drops anymore.

coolmodi avatar Dec 03 '20 17:12 coolmodi

I have identified the first issue that is causing bad performance. The change to address this is here: https://github.com/Aviana/LunaUnitFrames/commit/1c0f63fd3c6c5d79bd9b89ef858176c4e711b5a7

Aviana avatar Dec 04 '20 08:12 Aviana

I have been running cpu profiling for a few raids now and i have had a lag free experience so far. However i had to disable Details and NovaWorldBuffs since they consume a lot of cpu power aswell. I will look into further optimization anyway.

Aviana avatar Dec 15 '20 16:12 Aviana

I am still experiencing performance issues in long raids using the latest version. The lag mainly occurs on pulls and on AoE effects that applies debuffs. Also, the longer the raid is, the longer it takes to /reload or to log out. Raiding fora few hours will result in an log out or /reload time for over a minute, sometimes several minutes.

Anghammar avatar Dec 19 '20 14:12 Anghammar

I'm using 3.050 because 4.040 still causes terrible fps problems. With 3.050 everything works fine even after a 5 hour raid session.

coolmodi avatar Dec 19 '20 18:12 coolmodi

Please try 4060 there should be a lot less lag.

Aviana avatar Feb 24 '21 17:02 Aviana

4060 has made the stutter problem much better, but not 100% gone. Still it is usable for now. Thanks

Lipovske avatar Feb 25 '21 04:02 Lipovske

To make this better i need more information. With my current settings (which are somewhat default i experience no issues myself.

If someone could describe the problems a bit more in detail (running the latest version) it would be of great help. Or even upload their entire config file (from the WTF folder).

Here are also some guiding questions:

Does it lag the entire interface? Does it lag from the moment you log in? What kind of/how many buffs/debuffs do you monitor on the raidframes? Do you use other tags than the default ones?

Aviana avatar Mar 24 '21 16:03 Aviana

Does it lag the entire interface? Yes Does it lag from the moment you log in? Yes, but for me at least the lags only occur when mobs die and only in a raid environment. It is REALLY noticeable on a fight like KT phase 1 where mobs are dying every second its just a constant micro stutter whenever one of the skeletons dies. What kind of/how many buffs/debuffs do you monitor on the raidframes? I track my class buffs on the raid frames, as well as a square that tracks aggro and another square that tracks Chains of Kel'Thuzad;Righteous Fire;Icebolt;Frost Blast;Dominate Mind;Cause Insanity with timer and texture checked. Do you use other tags than the default ones? The only other tags I have on my raid frames is [nameafk][br][combatcolor][missinghp] in the center

If you can get into a naxx raid and get to the KT fight that is where you will be able to see the micro stutter lags that happen when mobs die the best.

Lipovske avatar Mar 24 '21 21:03 Lipovske

@Lipovske have you tried deleting your LunaUnitFrames.lua file to test with a "fresh" install?

chrisblossom avatar Mar 24 '21 22:03 chrisblossom

@chrisblossom yes only way I have completely fixed it is by going back to version 3.x.x

Lipovske avatar Mar 24 '21 22:03 Lipovske

I have run a full Naxx with your settings. There were no issues with performance. May i ask what kind of processor you have?

Aviana avatar Apr 01 '21 13:04 Aviana

I have a Ryzen 5 3600. I will install the latest release again for the next naxx run I do on Saturday and record KT phase 1 so you can see.

Lipovske avatar Apr 01 '21 14:04 Lipovske

I'm starting to suspect that my performance issues is caused by an interaction between luna and some other addon, or possible another addon all together. Although I failed to solve the issue in earlier attempts to disable all non-vital while raiding, I must have missed some addon because two weeks ago I had almost no performance issues using only a minimal amount of addons (including Luna!). Last raid I enabled some more addons and got the performance issue again. Will update when I figure out which addon it is and if it really has anything to do with Luna.

Anghammar avatar Apr 01 '21 21:04 Anghammar

@Lipovske there isn't much to be gained from a video. I do believe you that you are having issues. You could list me alle the addons you have active and maybe upload your Luna setttings file from the WTF folder.

Aviana avatar Apr 02 '21 05:04 Aviana

Addons: AtlasLoot Classic Aux Bagnon Bartender4 ClassicAuraDurations ClassicProfessionFilter Details ItemRack Leatrix Plus Luna Unit Frames Nova World Buffs OmniCC Plater Prat 3.0 Quality of Life: Classic Heals Quartz Spy WeakAuras WIM Tukui DBM

I have disabled All these addons except DBM, Weakauras, and bartender4 during a raid and still had the same issues.

LunaUnitFrames WTF.zip I use the HEALS profile.

I am currently using version 3.x and have no issues with lag except when players join a raid but that doesn't bother me at all. Any version 4.x causes lag when mobs do their death animation. It got much better with the latest update you did to try and fix performance issues but is still there.

Once DMF week is over I will try running naxx with only Luna active and see if I get the same issue.

Lipovske avatar Apr 03 '21 01:04 Lipovske

For what it is worth, I mainly experience lag using luna in raids with complex square setups. In bgs I have quite a lot in the squares section for major ccs and cds, but when I applied those to my raid frames for naxx I'd lag immensely but when i removed them not so much.

BirkenBoard avatar Apr 13 '21 04:04 BirkenBoard

When I switched from 3 to 4 for the first time, I experienced 0 lag in Naxx. One week after I started lagging again and by now it is horrible, I am playing on 15fps during big pulls. I had the same issue in bwl and aq40. It seems like performance degrades over time and the faster your guild pulls the worse it is. Since I also play a dps class (besides a healer) I will turn off squares this week and see if it is any improvement.

dfarkas4 avatar Apr 13 '21 12:04 dfarkas4

Since I also play a dps class (besides a healer) I will turn off squares this week and see if it is any improvement.

I am quoting my other account here. I did multiple PTR practice runs and a speedrun with big pulls just earlier, testing out different stuff with luna. Turning every all squares off made lag go away completely @BirkenBoard and @Aviana

ZitHub avatar Apr 15 '21 22:04 ZitHub

Yes i can now confirm that i had some slight lag after putting up three squares with the same buffs/debuffs that Lipovske watches during my latest naxx raid. Now that i know that it is only squares and i can reproduce the issues i can work on adressing it.

Aviana avatar Apr 16 '21 05:04 Aviana

Whelp, glad I could help a bit, meant to post this information months ago, but doubted myself on if it was relevant or not since my use case is far more complex than everyone else I know who uses luna.

BirkenBoard avatar Apr 17 '21 23:04 BirkenBoard