Open
Description
openedon Oct 6, 2022
I have noticed a few issues related to performance/usability when navigating between folders - esp. when a folder contains larger number of files. In my testing I use a folder with about 300 photos.
I plan to create separate issues/PRs for each of the items below and use this issue to track the overall progress.
- Full refresh of a folder is performed during onBrowseUp (back button) Avoid full folder refresh during onBrowseUp #10688
- WebDAV call sent by the Android app to read folder contents executes a few database queries for each file.
- Reading information about share notes requires 4 DB queries per file. Reduce number of database queries during WebDAV propfind request server#34471
- Reading DAV:displayname property requires 1 query per file. WebDAV - use file/folder name for dav:displayname server#34508
- API call to retrieve information about files shared from a folder requires a few database queries for each file. Reduce number of queries to read shares in a folder server#34918
- File list "jumps" after scrolling when an asynchronous operation finishes #11033
- When changing folder in the app the file list gets refreshed three times, i.e. OCFileListAdapter::swapDirectory is invoked three times. Two of the calls seem redundant when all the information cached on the device is still valid.
- OCFileListAdapter::swapDirectory is invoked in response to EVENT_SINGLE_FOLDER_CONTENTS_SYNCED broadcast - even when the ETag check in RefreshFolderOperation determines that the folder has not changed. Refresh UI only when changes are detected on the server #11100
- OCFileListAdapter::swapDirectory is invoked again in response to EVENT_SINGLE_FOLDER_SHARES_SYNCED broadcast. It seems that the code that retrieves the shares does not try to check, if the data about shares retrieved from the server is the same as cached data. Trying to optimize the process of saving shares in the local DB in Use Room for saving shares in FileDataStorageManager #11255.
- Reading file information from the local SQLite database (FileDataStorageManager::getFolderContent) takes much longer than expected. Profiling suggests that most of the time is spent inside createFileInstance method in these operations:
- deserializing JSON data (~50% of time)
Initial attempt to improve this (Defer expensive operations until results are read from OCFile #11181) abandoned.Simpler approach proposed: Avoid JSON deserialization in common trivial cases #11251. - obtaining column indices in cursor.getColumnIndexOrThrow (~30% of time) Use Room for filelist table reads #11098
- Skip check for existing files when reading file data from local DB #11227
- deserializing JSON data (~50% of time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment