-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi.
In its current state, the app downloads the complete list of bookmarks if its started freshly (not from RAM). Correct me if I'm wrong.
To load my entire collection of bookmarks it currently takes about 4 seconds (in Wifi), which is not bad, but could be better and more efficient.
I've been thinking about a way to improve this. I'm posting my thoughts here before I try to implement it, because you may have some better ideas.
After each single step the app should still work fine.
- Add a Class
BookmarkLoaderwhich acts as a proxy between theBookmarkListActivityand theScuttleAPI. TheBookmarkListActivityshould only call methods from theBookmarkLoaderwhich then calls theScuttleAPI(for now). - Add a Class, that can save and load the bookmarks and everything related to it from a local storage (preferably, one that doesn't need special permissions).
- Let the
BookmarkLoadersave the Bookmarks to the local storage, after downloading them. Also save the current timestamp somewhere.
When loading the bookmarks, theBookmarkLoader, should first check, if there is local data. If there is, it should use theposts_update.phpAPI function, to check if the bookmarks have changed on the server, since the last sync. If so, re-download all bookmarks - This step will need the
all?hashesAPI function, which is supported by the delicious API but not yet by the semantic Scuttle API. When implemented in the API, theBookmarkLoadershould load and save the hashes locally. When the bookmarks have been changed server side (posts_update.php) theBookmarkLoadershould load all hashes and compare them to the local database. Then it should get all the bookmarks that have changed (have a different meta-hash).
Adding and editing will not affect the local storage directly to avoid syncing issues.
I hope my description is understandable. :-)
I will start with the implementation, when I find the time (and after finishing the other feature(s)). Any suggestions are welcome.