-
-
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
Fix Image Loading When Offline #14502
base: master
Are you sure you want to change the base?
Conversation
It still takes a long time to load images when on cellular. My server address is 192.168.1.2 and as I test this on a guest Wi-fi network with 192.168.1.0/24 as well, it seems Nextcloud is quicker to detect my server unreachable on here versus on Cellular. However, load times are much better when on the guest Wi-Fi and loading images due to this code change. Videos always load immediately regardless of WiFi or Cellular |
I dug more into it and found the timeouts for ReadFileRemoteOperation were extensive by default but you can customize the timeouts. By lowering them, the connection error happens sooner and the app responds quicker. Images are now loading fine when on cellular and I cannot reach my server. |
76101c3
to
429a28a
Compare
Found another area to reduce timeouts and speed up the app, that is the timeouts for OCVersionCheck. Changed them to 1000 and app is responding better when offline. |
cb9398f
to
a0fdf00
Compare
Thank you for the PR. RefreshFolderOperation/ReadFileRemoteOperation may need more time. If we lower the default session time out value, the user may not get the latest result. Default = SessionTimeOut(60000, 15000) @tobiasKaminsky Most likely it will fail, and 1 second is very low. What do you think? |
e69afe3
to
89643a1
Compare
Signed-off-by: Alex Knop <[email protected]>
Signed-off-by: Alex Knop <[email protected]>
Signed-off-by: Alex Knop <[email protected]>
Signed-off-by: Alex Knop <[email protected]>
Signed-off-by: Alex Knop <[email protected]>
89643a1
to
56aaebb
Compare
Problem:
Although Videos were loading immediately when offline, Images were not
Solution:
Found that checking for whether file is offline was passing, but the ! in the code was making it false, forcing a sync which would timeout (taking extra time) and preventing immediate access to images
Fixes #14470