Kouzukii / ffxiv-priceinsight

A FFXIV Plugin to display marketboard prices on item tooltips
MIT License
17 stars 15 forks source link

Severe lag/high ping when using the region option + area change #16

Closed vrandon21 closed 1 year ago

vrandon21 commented 1 year ago

I've noticed that since the last update, where the region and datacenter travel was added I was getting severe lag/high ping issues, it's like it's fetching all the catched prices from universalis every area change, ping can go as far as 3000+ (using PingPlugin from karashiiro in Dalamud to check it) and well is obviosuly noticeable in game, while Price Insigh is disabled I don't get this bad ping, even with mudifish enabled things get crazy, my ISP download speed is about 220MB download and 50MB upload, my ISP is over NAT but I still don't think the issue comes from there, but idk. Is there an option to chose when this update prices? (like cache prices every 90 min) or is just borke rn? I had the alt option for update prices on (even if I don't use it, I prefer to hover over items) but even not trying to check prices this happens, no matter if my inventory is not even opened. I really like the idea behind this plugin, but that lag is severely bad, maybe a button for togle off/on could patch the problem for a while, like turn on when you need it, but in general I can't have this on without severe lag.

Kouzukii commented 1 year ago

I'll have a look at what could be causing this. All prices are fetches in the background so it should not affect your gameplay. Also all prices are fetched in bulk when logging in or changing worlds, in total it should be less than 1MB transferred, especially not when changing areas.

Kouzukii commented 1 year ago

With area change you are referring to simply loading a new area, not world travel? Also you are experiencing the lag on your home world?

Kouzukii commented 1 year ago

Could you type /xllog into the game's chat, click the cog in the top left and and set the log level to debug? When you experience lag again you should see log lines such as [PriceInsight] Fetching 49 items took 500ms. Send me a screenshot of those logs please.

vrandon21 commented 1 year ago

With area change you are referring to simply loading a new area, not world travel? Also you are experiencing the lag on your home world?

Yeah, in my homeworld, it could be entering an instance or just by changing areas (idk limsa to east shroud)

Could you type /xllog into the game's chat, click the cog in the top left and and set the log level to debug? When you experience lag again you should see log lines such as [PriceInsight] Fetching 49 items took 500ms. Send me a screenshot of those logs please.

Give me a few hours, and I’ll see it.

vrandon21 commented 1 year ago

image I only turned it on in dalamud and changed areas, didn't open my inventory

Kouzukii commented 1 year ago

Yeah that clearly looks like an issue with fetching too much data, I'll see what I can do

Kouzukii commented 1 year ago

Looks like I underestimated the impact of the "Region" setting, with it enabled the amount of data transferred when prefetching is quite a lot. In the next update prefetching will be disabled by default and can be toggled on in the configuration.

vrandon21 commented 1 year ago

Well I gues there's no other way to handle that much data, guess toggling is the way to go. Thank You, I'll look forward to the next update.

Kouzukii commented 1 year ago

I've made a change to the universalis API to reduce data transfer: https://github.com/Universalis-FFXIV/Universalis/pull/848 Once that is live, it should be no issue anymore to use prefetching.