-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Try to only process changed files for auto upload #12719
Conversation
6414d69
to
24f97c2
Compare
24f97c2
to
3529d0a
Compare
3529d0a
to
ef8e5f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Android 14 and Android 7.1.1 working.
/backport to stable-3.28 |
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
54e5958
to
22913b8
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12719.apk |
blue-Light-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/12719-Screenshot-blue-Light-10-28 |
Initiated by #12596 the idea was to reduce the times the full file system scan for changed files for auto upload is needed. This PR adds that when ever ContentObserverWorker detects media files (so only images and videos) change, the FilesSyncWorker does not go through every file in the corresponding folders. Now it only checks which sync folder (if any) the file belongs to and only enqueues this file for upload.
Test this PR
To test this functionality, one can set up the camera folder as an auto upload folder and take pictures. The upload of the file should start after about at most 15s automatically in the background.
This behavior is the same as before, but it now should take less time for especially large media folders, and it does not use a foreground worker for the sync worker.
Known Issues
Sometimes some changes are not detected when too many changes happen one after another and the upload of those files stops until the app is opened. So sometime files are missing from upload. Though this is not optimal, it seems like this is an issue with the content observer worker. As we not really rely on this functionality (a full file system scan is still scheduled every 15 min) I think this is still better than the functionality before. So this functionality should rather be seen as a bonus that uploads files faster if it works but if not there is still a fallback.