ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

Persisted/Replicated index #142

Closed kirillt closed 1 year ago

kirillt commented 2 years ago

Resources index is mapping path to id. Right now we use Room database for storing it. Since the app is supposed to be used coupled with replication mechanism (like Syncthing) we can avoid re-indexing if we replicate it to other devices. It might be stored in hidden folder. Only relative paths must be used in this case.

Some users might be willing to not replicate index and create it from scratch instead. They might have powerful device or few resources; weak internet connection or just only single device. Storing the index in Room also should be faster. For such case we should have preference in settings menu (#77) to allow such a user to disable index replication. Resources index is pretty lightweight comparing to resources itself, so syncing it to other devices would certainly take less time than building it on another device from scratch. We also should use only one backend for managing index. Such a backend will be arklib and it will be used on all platforms. So I don't really see a lot of sense in maintaining Room (which would be 2nd backend).