nikkisaurus / FarmingBar

4 stars 1 forks source link

[BUG] [alpha] performance issues #33

Closed Road-block closed 3 years ago

Road-block commented 3 years ago

Describe the bug There are no Lua errors, I noticed my game "stuttering" (this happens typically when the Lua garbage collector fires) when entering combat constantly to the point of panning the camera around in combat looks like a slideshow 😊.
Since I keep a log of what addons I update, I started by disabling recently updated addons and testing, when that yielded me no results, I did a binary search (disable half and test, when you find the half that causes the issue, disable half of those and keep narrowing it down)
Eventually I isolated it to FarmingBar v3.0-alpha12-bcc (issue wasn't present in previous alpha)
I then re-enabled all my other addons except FarmingBar and the issue goes away.

Client 2.5.1.39475 (current live BCC) enUS

Additional context FarmingBar-SavedVariables.zip

niketa-wow commented 3 years ago

Can you clarify, does this persist throughout combat or just when you enter combat? How long does this last?

niketa-wow commented 3 years ago

Also if you can do an event trace for me that includes when it starts and stops, that would be helpful.

Road-block commented 3 years ago

upon entering combat and during combat, stops when combat stops

niketa-wow commented 3 years ago

Widgets/FarmingBar_Button.lua in the block 211 (if trackerCounts...) can you comment out the block or insert an if true then return end to see if it's this causing it?

My hunch is that it's checking counts too frequently since I added the tracker alerts. Not sure what else I changed that would do this.

Road-block commented 3 years ago

Will do when I get a chance (in a run atm)

Road-block commented 3 years ago

No change when commenting out that block.
The spammiest event seems to be BAG_UPDATE_COOLDOWN

niketa-wow commented 3 years ago

Which character? Or is it all? I wanna see if there's any specific traits about the objectives that are causing an issue.

Road-block commented 3 years ago

Bushido

niketa-wow commented 3 years ago

I removed the BAG_UPDATE_COOLDOWN event. BAG_UPDATE should catch all additions, so I believe this event is overkill.

https://github.com/niketa-wow/farmingbar/releases/tag/v3.0-alpha13

Road-block commented 3 years ago

BAG_UPDATE_DELAYED that batches bag updates might be an idea then.

Road-block commented 3 years ago

I tested alpha13 with switching to the batch bag update event, and issue seems to be gone (or at least at the limit of my perception) , at least in solo combat, hoping to test in dungeons next.