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

Background indexing #23

Open
kirillt opened this issue Aug 17, 2021 · 3 comments
Open

Background indexing #23

kirillt opened this issue Aug 17, 2021 · 3 comments
Labels
feature Feature to implement

Comments

@kirillt
Copy link
Member

kirillt commented Aug 17, 2021

It would be great, if a user could switch to other activities with the app while huge folders are being indexed.
E.g. trigger indexing of other folders or tag resources. It can happen that the user tags a resource, which is still not indexed.
Then we need to postpone modification of the storage, since we don't know the resource's id.
This means, beside of indexing queue we also need to create tagging queue.

@kirillt kirillt added the feature Feature to implement label Aug 17, 2021
@kirillt
Copy link
Member Author

kirillt commented Aug 17, 2021

Resources which are not indexed yet, but already tagged by the user — must be prioritized in indexing queue.

@kirillt kirillt changed the title Asynchronous indexing Background indexing Nov 22, 2021
@kirillt
Copy link
Member Author

kirillt commented Mar 29, 2023

@mdrlzy Probably, we should re-think this issue: let's just allow user use Navigator without waiting while all previews are generated. I.e. non-blocking previews generation. Later, it will be possible to separate other stages of indexing.

Step 1: non-blocking previews generation.

  • When resources ids are known, grid items could be mocked and user should be allowed scroll Resource Grid
  • Resource stubs should be marked by endless spinner if preview for the resource is not ready yet
  • Gallery could be made available too, also with endless spinner on scheduled previews
  • Gallery screen: user should be able to see tags and/or see details of the resource
  • Resource Grid screen: user should be able to query resources even if they don't have preview yet

Step 2: non-blocking metadata extraction.
Depending on selected sorting criteria, ordering of resources can depend on metadata. So if metadata is not computed yet, we can't sort resources, in some cases.

Step 3: non-blocking indexing.
If we have a collection of resources, where some resources lack ids, it becomes impossible to locate them using tags or display their scores. Versions will not be possible, too. We need to be able to update queries in a way which is not confusing for the user.

Step 4: app-independent indexing.
It would be awesome to decouple indexing, metadata extraction and previews generation from particular app (Navigator, Shelf, Memo, etc.) and do in background once for all dependent apps. This could be supported by implementing Android service which would serve all ARK apps with index and storages.

Step 5: user-dependent prioritization of processing queues
If an id or metadata are missing for a resource which is subject to some user's action (tagging or something else), we should prioritize it's processing (i.e. indexing or metadata extraction).

@kirillt
Copy link
Member Author

kirillt commented Jan 3, 2024

Opening a resource in Gallery view should prioritize its processing in the queue, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature to implement
Projects
None yet
Development

No branches or pull requests

1 participant