I noticed something else.
It might be related to this: I switched to another tab in the browser.
When i returned to the Syncthing tab i got this:
Maybe the browser suspends or throttles the website when it is not active. Now many requests queue up and once the tab is reactivated all these requests are sent.
Then again: What is this completion-request?
It seems to request the same device-ids over and over again.
The responses come in only slowly one by one.
–
Ideas for a solution:
Maybe these requests should be streamlined for example by allowing only 5 or 10 simultaneous requests to the backend?! This way the backend does not get overwhelmed by these requests.
Then another thing: When the requests are beeing queued they should collapse similar or duplicate requests so the backend has a chance to keep up with the requests and the number of requests is simply reduced by the client, when the server replies slowly instead of firing more and more requests, while the server is already 500% overloaded…
Another attack point could be to optimize the server-side handling of the most frequent requests, eg. by using better caches or in-memory state to reply to them. This way the server can (hopefully) always keep up with the requests fired at it.
One more:
See the footer line: 1959 requests in 7 minutes. 10MB transferred. Theseevents?since=
requests seem to be fired several per second (at this point). Maybe there is a bug in the client which causes them to be sent too often. I guess once per second or every few seconds would be sufficient.
Update:
Now after 12 minutes it got stuck again. It might be triggered by me changing a share setting on antoher device, which shortly disconnects the devices (as far as i know), which probably triggers the restart of some internal processes, which then again probably causes the UI to request a lot of additonal things (i see this completion
-request a lot when it gets stuck).