ARK-Builders / ARK-Builders/Navigator

Incremental sorting

Open
#73 2 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Kotlin
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by tracing where resource sorting runs when opening a folder and returning from gallery mode, including how persisted sorting preferences are applied. Measure the delay on a large collection, then evaluate the proposed visible-top-items and background-sorting approach; done means frequent navigation shows the visible resources promptly while the complete ordering remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.