Very slow load time (+2min), but no issues in private mode
Categories
(Core :: DOM: Service Workers, defect)
Tracking
()
People
(Reporter: letourneau.ian, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0
Steps to reproduce:
Most pages I'm trying to load appear to be slower on regular navigation compared to private mode. Even with all extensions disabled and on a brand new profile.
It's especially the case for one of the web app I'm working on. It's taking a really long time to load (+2min) in regular navigation, but it loads just fine in private mode (<2sec).
When profiling, it appears that many requests are "waiting for socket thread" for most of the time.
Here are different profiling:
- Regular navigation (with logging): https://share.firefox.dev/3SXh9Mc
- Regular navigation (without logging): https://share.firefox.dev/3YUfc6N
- Private navigation: https://share.firefox.dev/4fVLzbg
You can try loading this particular page here: https://fresh-salmon-32-x5f24fy83qqt.deno.dev/
Connection info:
date; curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nAppCon time:\t%{time_appconnect}\nRedirect time:\t%{time_redirect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null https://fresh-salmon-32-x5f24fy83qqt.deno.dev/
Wed Aug 21 11:25:48 AM EDT 2024
Lookup time: 0.161697
Connect time: 0.182355
AppCon time: 0.244100
Redirect time: 0.000000
PreXfer time: 0.244257
StartXfer time: 0.377159
Total time: 0.502411
PING fresh-salmon-32-x5f24fy83qqt.deno.dev
[...]
--- fresh-salmon-32-x5f24fy83qqt.deno.dev ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9015ms
rtt min/avg/max/mdev = 21.215/23.123/30.397/2.787 ms
The same issues happen on FF on my phone.
Trying to load this page on Chromium or other browsers seems to be ok (not as fast as FF in private mode, but still good).
Could be similar to this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1903975
Actual results:
Very slow page load on regular navigation, but no issues in private navigation.
Expected results:
Loading time should be fairly similar in regular navigation VS private navigation.
Reporter | ||
Comment 1•6 months ago
|
||
Private navigation profiling with logging enabled: https://share.firefox.dev/3YSYdC7
![]() |
||
Comment 2•6 months ago
|
||
FWIW,
If set dom.serviceWorkers.enabled
to false
, the page will load very quickly.
![]() |
||
Updated•6 months ago
|
![]() |
||
Updated•6 months ago
|
Reporter | ||
Comment 3•6 months ago
|
||
(In reply to Alice0775 White from comment #2)
FWIW,
If setdom.serviceWorkers.enabled
tofalse
, the page will load very quickly.
After digging a little bit more in the profiling results, I realized there seems to be a bug in the framework we are using (Qwik) that causes the service worker to execute for loops "infinitely" until something gets garbage collected or the requests timeout (ref. the DOM Workers under localhost (3/3) PID: 13380 in the profiling results). While this is happening, the whole tab is slowed down/frozen.
So for this specific case, the framework is at fault. But I'm still curious to understand why this issue is not happening in Private Navigation 🤔
![]() |
||
Updated•6 months ago
|
Comment 4•6 months ago
|
||
(In reply to letourneau.ian from comment #3)
So for this specific case, the framework is at fault. But I'm still curious to understand why this issue is not happening in Private Navigation 🤔
Service workers are not yet supported in private browsing mode, see bug 1320796 where we are working on it. Marking as WORKSFORME as the normal case seems ok and the PBM case is handled there. Thanks for your support!
Description
•