perf: Lazy gem DPS sort to avoid blocking UI #9959
Conversation
|
PathOfBuildingCommunity/PathOfBuilding-PoE2#2184 I think something fixing this was already introduced? It's not ported yet: #9921 |
|
Yeah I saw that, it improve things, but ultimately, I think the DPS sort should still be lazy regardless, no matter how fast the calc gets, it'll always take time proportional to gem count and build complexity, and blocking the dropdown on open is a UX problem in itself. |
|
Does typing in the field work during the lazy sorting, and if so, does it cancel/restart the sorting? (That is, was this the default behavior that was inaccessible because of the UI lock?) That would be another colossal win, on top of the basic non-locking behavior. |
|
Yes, you can filter search, it'll continue to sort in the background, UI is no longer blocked. 2026-07-21.16-25-48.mp4 |
Fixes # .
Description of the problem being solved:
Sorting gems by DPS can be very compute intensive, on some builds it can take multiple seconds, and the UI freeze while doing so.
This PR fixes it by sorting gems lazily.
The result is that opening the gem list is now always instant.
Before:
pob-before.mp4
After:
pob-after.mp4
Steps taken to verify a working solution:
Link to a build that showcases this PR:
Before screenshot:
After screenshot: