-
Notifications
You must be signed in to change notification settings - Fork 46
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
app slow to show configured servers on start-up #291
Comments
The |
|
Oh sorry, I thought this was the search screen, my mistake. |
Should be better now. |
It is not. Just showing a banner that it is refreshing the list is not okay. There should be no banner and no delay. There is no need for network activity at all! At least not on the main thread. If it can update in the background, fine. |
Server list is cached now for one hour. |
Actually you are not allowed to do that. The web server indicates information about caching!
See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control |
Just to make it clear: |
Okay, but that means that there has to be a network call, which you did not want:
|
We are only talking about Using a conditional request you can skip a lot of work if the file on the server didn't change though (304 response), no need to verify the signature, no need to parse the JSON, no need to update the model... I don't recall exactly what gets called when though. Edit: not to mention this could be done in the background, not needing to block at all :) |
That would be true if the models would be cached on that level (like they are since the last update). Edit: not to mention this could be done in the background, not needing to block at all :) All the processing already happens in the background. You see the loading bars until there is something to show, otherwise the user does not know why the list is empty. |
Maybe this is the best we can do then. I'm just a bit worried about choosing a caching yourself, i.e. 1 hour, especially if the user cannot override this except by clearing browser cache (I guess)? |
To clear it, the app data has to be cleared, which removes all other saved data as well. I can reduce the 1 hour though. |
It takes around ~2 seconds before the server is shown, until that time this is what is shown:
Is there network activity at this stage? What is fetched? Why is it so slow? Why does it not happen in the background?
The text was updated successfully, but these errors were encountered: