Auctionator / Journalator

World of Warcraft addon. Keep track of your gold making on the AH, crafting orders and with vendors
https://www.curseforge.com/wow/addons/journalator
MIT License
10 stars 6 forks source link

Significant gpu load and freezing on Journalator initial getProfit call #40

Closed Wuuodd closed 1 year ago

Wuuodd commented 1 year ago

1.20 version of Journalator with added vendoring and and Work Orders is causing a significant lag spike on MinimapIcon.Initialize() call with large archives

Seems to be caused by multiple duplicated cold Archive:Open calls from all the GetRange inside GetProfit()

Symptoms: gpu load spikes from 30% to 95+% and game freezes completely when Journalator minimap icon is first hovered after loading. This requires a rather large sales archive (1000+ transactions), not as noticeable on low sale numbers.

Cases tested:

Can provide a sample Journalator.lua for testing if necessary

plusmouse commented 1 year ago

Ok. I can see why this is happening. Just working on a fix.

plusmouse commented 1 year ago

(just waiting for the build script to finish)

plusmouse commented 1 year ago

Can you try this build:

Journalator-1.20-2-g246dcf8.zip

Wuuodd commented 1 year ago

1.20-2-g246dcf8 reduced freeze time from ~3s to about ~1s. Much faster, but still noticeable due to completely freezing the game

plusmouse commented 1 year ago

Do you use the month/day revenue amounts in the tooltip for the minimap button?

Wuuodd commented 1 year ago

They do show up, but I don't really use them. Also, the "Loading 1/2" now shows up on init (wasn't there before).

Perhaps storing a separate set of last revenue values and showing those in the tooltip might be faster then completely recalculating?

plusmouse commented 1 year ago

Can you try this build? Journalator-1.20-4-gbd6df51.zip

image

The storing the separate set of precomputed values idea is a good one. I'll add investigating that with keeping the values seemly up to date without loading the full dataset to my todo list.

Wuuodd commented 1 year ago

Journalator-1.20-4-gbd6df51 fixed it. Doesn't trigger on random hovers now, but still provides all the data when called. Thank you for your quick response 👍