Skip to content

Improve performance when processing inventory fetches in parallel #5358

@Dan-Linden

Description

@Dan-Linden

Related to performance work in #5046. Under some circumstances shortly after login the viewer will have a framerate ~10 FPS until the Inventory is loaded.

Viewer launches multiple inventory requests in parralel, once response arrives viewer attempts to split processing into small chunks using AISUpdate::checkTimeout(), however each response accounts for processing time individually, so when multiple messages arrive each one takes 0.008s per frame thus tanking overall performance.

Task:
Modify checkTimeout to be more flexible, like 'no more than 0.008s per task, no more than 0.012 total for all tasks'.

AISUpdate::checkTimeout() might also need to be smarter and instead of unsuspending each frame, might need to unsuspend when previous jobs completed to not do a pricey wake up just to process a pittance and suspend again.

Test setup A:

Copy-paste outfits, so you have around 2000. (QA can use account "fancynancy914")

Test Plan:

Clear the viewer cache.
Log in.
Open Fast Timers.
Open outfits list.
Verify the framerate during loading is at least 30fps.
Relog (needs cache)
Open Fast Timers.
Open outfits list.
Verify the framerate during loading is at least 30fps.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttriageFlags issues that need to be triaged

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions