-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
JS networking blocked on FF after Riot has been in a background tab for a while #7858
Comments
Some further notes:
|
I am sorry to hear you are having this slowdown. I think some more detail about your system configuration may be helpful. Since you're using Firefox, can you go to about:telemetry#environment-data-tab_system and copy the data listed there? |
Eigenschaft Wert |
BTW, this did not happen with earlier versions of Riot Web. I think it started with 0.17.0, but I'm not sure. |
Do you observe the same behavior in other browsers, or only in Firefox? |
I used it for one and a half days in Chromium (Linux) now and didn't see any problems. There are hangs, sometimes, too, like only spinners for about 10s or more, but I guess that's probably caused by Synapse. Chromium populates the not-yet-loaded items much faster than Firefox afterwards (while I don't see much of a speed difference otherwise), and it doesn't become unusable over time. That's not a solution for me, unfortunately, as I'm not allowed to install other browsers at work. |
is this related to #7801 ? |
More notes:
|
Thanks for the continued updates! I would certainly like to work out what's causing the poor experience you're seeing. Are you always running the stable version on riot.im/app? |
I'm running a self-hosted stable version against my own Synapse. I can't be 100% sure yet, but it seems that deactivating uBlock Origin did the trick (though separate cookie blocking isn't even possible there, I misremembered that). Riot Web worked much longer than normally, I think, until it broke on Matrix HQ and FF told me that this tab was slowing down the browser over and over again each time I told it to wait. This was reproducible every time I looked at Matrix HQ for a few minutes; then I fired up the dev tools to look what was going on, but since then it doesn't happen anymore. X-) I have uBlock Origin activated again now, but not for the Riot tab. Let's see how it turns out. |
Aha, glad to hear there is a potential theory at least! 😁
For this particular bit, you are definitely not alone. Several people mentioned seeing this in both Chrome and Firefox today, but now the room state seems to have changed and resolved the issue for now. Anyway, please do let us know if this variant returns as well. |
Another insight: While investigating 502 errors I saw in the connections tool, I found in the Synapse README that an Apache proxy should have the nocanon option added to the ProxyPass keyword, which wasn't the case at my proxy. This eliminated the 502s, and it seems as if Riot Web now even works with uBlock Origin enabled—at least for a few hours, which is more than I often got before. Could it be the combination of proxy errors and uBlock Origin that was the problem? As I'm off for holidays now, I can't test it over the next two weeks to be really sure that helped. I'll get back to you in January. Happy holidays to you all! 🎄 |
Unfortunately, the measures above didn't fix the problem. But over the last few days, I analyzed it a bit more, and I can provide more details:
I hope that helps hunting down the problem. I'll change the issue title to better match the actual problem. |
This does not happen anymore. I'm not sure, though, if it was fixed by Riot Web 1.0.1, Firefox 65.0.1, or by me starting to use workers in my Synapse installation. My guess is that it's the latter—that it only happened because after switching to the Riot tab, my Synapse was busy sending presence updates to large numbers of other homeservers and thus sometimes didn't answer for minutes. (I think I saw blocked tabs a few days ago again, but it was only for a second or so.) The question would then be why (and how) Riot Web blocks JS in other FF tabs if network requests aren't answered quickly. |
So far, I am not seeing anything here that Riot itself can change to improve the situation. It sounds like it is related more to how Firefox internally schedules work like network activity and JS execution among tabs. Does that sound correct? |
After using Riot Web in Firefox (63.0.3 now, but also in earlier versions) over a longer time (several hours), often switching rooms etc., Riot becomes slower and slower.
It often hangs, e.g. while loading room members or avatars, for half a minute or a minute, and then suddenly everything is populated very quickly.
It's not Synapse, though, Riot Android used at the same time doesn't show the same slowness, and after an FF restart, Riot Web is much faster again.
I thought this was #7105, but while it has become quite a bit better since that bug has been fixed, the behaviour is still there. When #7105 was still unfixed, the complete FF would become unusable after some time, and quite quickly.
Now, the rest of FF is often (not always) usable without problems.EDIT: Not sure if this is true, maybe I only restart FF earlier than before, see the first comment below.After some time of growing slowness, Riot states that it has lost the connection to the homeserver (while Synapse is in truth running happily). At this point, switching to another tab using an FF extension (Tree Style Tab) often only works after half a minute or so (but switching tabs using the tabs on top still works). Reloading or Shift-Reloading the Riot tab doesn't work, only goes into loading state without changing the tab contents or replaces the tab contents with white only, but doesn't load anything.
A restart of Firefox fixes that, though after switching to the Riot tab, almost always "Missing Translation"s are shown, see #7847, until I reload the tab. After that Riot Web is snappy again for a while.
While watching Synapse logs and network console in FF, it seemed to me that there might be requests to Synapse that are only answered after a very long time or even never, but Riot Web won't close those, and will only use a certain number of concurrent requests to Synapse. As the number of never-answered requests grows, the number of connections used for actual work goes down, until Riot Web can't even sync anymore.
I'm not at all sure if I interpreted that correctly, though; might be something else entirely.
The text was updated successfully, but these errors were encountered: