fmauNeko / MarketBoardPlugin

Market board information plugin for XIVLauncher / Dalamud
MIT License
39 stars 29 forks source link

Massive FPS drop depending on the amount of results shown #101

Closed valarnin closed 1 month ago

valarnin commented 1 month ago

Searching for Savage Aim Materia XI as a Cross-DC search drops framerate from 135FPS to 2FPS.

image

Changing to another less-popular item (which resulted in 60FPS) and back to Savage Aim Materia XI, this time the framerate drops to 10FPS.

image

This is only a problem when viewing the Market Data tab, framerate immediately goes back to normal when viewing the Charts tab.

Checking the actual raw data returned from a Universalis API request for Savage Aim Materia XI shows that there are 18,804 results, even with entries limited to 50 per the hard-coded value in: https://github.com/fmauNeko/MarketBoardPlugin/blob/4194ef1295ffb90d854caf08fef34a7889e3d6a1/MarketBoardPlugin/GUI/MarketBoardWindow.cs#L1172-L1178

Should there be an additional listings query parameter also hardcoded to 50 or some other sane number to limit the amount of data returned/displayed?

# When it manages to succeed, and not time out due to CloudFire errors:
$ curl 'https://universalis.app/api/North-America/41759?entries=50' | jq -r '.listings | length'
18084
# Again, rolling the dice on if CF will let the request succeed, but:
$ curl 'https://universalis.app/api/North-America/41759?entries=50&listings=50' | jq -r '.listings | length'
50

This is potentially the same as #46, but given the age of that issue and the lack of followup I'm not sure.

fmauNeko commented 1 month ago

Good catch, entries only limits the history and not the actual listings. Fix is coming.