Significant gpu load and freezing on Journalator initial getProfit call
Wuuodd opened this issue · 8 comments
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:
- not a hardware issue, freeze goes away when Journalator is disabled
- issue returns when only Journalator is enabled in addons (i.e. all other addons disabled)
- there are no Lua errors anywhere
- removing Journalator settings from Saved Variables completely or a large archive table from inside JOURNALATOR_ARCHIVE removes the freeze
- a bit of debugging shows 10+ Archive:Open calls at same time with 2 JOURNALATOR_ARCHIVE entries on minimap icon hover. First one always causes freeze
Can provide a sample Journalator.lua for testing if necessary
Can you try this build:
1.20-2-g246dcf8 reduced freeze time from ~3s to about ~1s. Much faster, but still noticeable due to completely freezing the game
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?
Can you try this build?
Journalator-1.20-4-gbd6df51.zip
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.