-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Skip check for existing files when reading file data from local DB #11227
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
Conversation
|
blue-Light-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/11227-Screenshot-blue-Light-21-35 |
|
One of the test failures seems to be directly related to the changes: I have tried to repeat the issue in the app (renaming folder manually), but this works fine for me. I am not sure yet, if the test assumes too much or if the storagePath should be set somewhere to compensate for the removed code. Other failures in EndToEndRandomIT seem unrelated - at least I do not see any connection. On the other hand the failure in DialogFragmentIT might be somehow related. It might be caused by a change of the timing between test execution in |
|
It turned out that the When a folder is synced locally With the original change the On Device pane stopped showing folders. 👎 I had to partially revert the previous commit and leave the check for directories. I hope this will also fix the failing testRenameFolder test. Assuming that in the typical situation there are much more files than folders, this still gives similar performance improvement as the first attempt. BTW - I have found one reason why I get inconsistent timings. At some point after starting the app, the JIT compiler decides to optimize the
This influences the results significantly. Previously I had not paid attention to this message, so I got skewed results depending on the moment the method got optimized. 😞 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #11227 +/- ##
=============================================
+ Coverage 3.24% 30.95% +27.70%
- Complexity 437 3317 +2880
=============================================
Files 566 565 -1
Lines 41614 41592 -22
Branches 5630 5637 +7
=============================================
+ Hits 1349 12873 +11524
+ Misses 40179 26786 -13393
- Partials 86 1933 +1847
|
If this kind of thing interests you, you may want to look into Baseline profiles so that critical methods like this one get compiled at install time. |
Interesting indeed. 😉 For now, there are still a few potential "regular" improvements in the pipeline. Would be good to learn this at some point.
If I see correctly the testRenameFolder test is passing now. But I am struggling to find the results... |
|
I have repeated the baseline tests and tests with the changes from this PR - this time making sure that in all cases the tests are executed after JIT decides to optimize the
We are gaining ~55 ms when skipping ~330 |
I wonder why it's computed but not saved. @tobiasKaminsky any insights here? Other than that, this is 👍 for me |
|
OK to merge this for now, thanks @starypatyk . I still don't know why the path is not stored for folders, but we'll go ahead with the current check. |
|
/rebase |
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
…tories Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
ec2759e to
d3841cd
Compare
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/11227.apk |
|
master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/7495-IT-master-19-41 |
|
Thanks @starypatyk ! |

As discussed in #10783 and #11181.
It seems that the code to check for existing files when reading file data from the local DB is no longer needed.
In my "standard" benchmark (~330 files in a directory on a low-powered device), with this change the average execution time of the
OCFileListFragment::listDirectorycall is reduced from ~320 ms to ~280 ms (but the timings are not very consistent).I have not noticed any negative side effects, but to be honest, I have no idea how to really test it.