Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental sorting #73

Open
kirillt opened this issue Sep 15, 2021 · 2 comments
Open

Incremental sorting #73

kirillt opened this issue Sep 15, 2021 · 2 comments

Comments

@kirillt
Copy link
Member

kirillt commented Sep 15, 2021

Right now, sorting of resources causes small delays on huge collections (e.g. 5000 of pictures). After addition of persistence of sorting preferences, this delay is imposed after frequent actions: opening a folder and going back from gallery mode to resources grid.

It may be possible to perform sorting in a smarter way:

  1. find top T resources and put K of them into visible frame;
  2. spawn sorting of the rest of resources in background;
  3. allow the user to do his stuff.

Implementation can be non-trivial, but performance would be better:
blocking phase: T * N operations to find top T resources (where N is number of all resources)
background phase: normal sorting of N - T elements

@kirillt
Copy link
Member Author

kirillt commented Feb 3, 2022

Eventually this should be implemented in the library, but it's not clear when it will be possible.

@kirillt kirillt self-assigned this Feb 3, 2022
@kirillt kirillt removed their assignment Jul 11, 2022
@kirillt
Copy link
Member Author

kirillt commented Apr 18, 2023

Also, lazy shuffling (#15) could be implemented in similar fashion.

@kirillt kirillt removed the advanced label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant