-
Notifications
You must be signed in to change notification settings - Fork 326
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
Slow start in Firefox #655
Comments
|
Thank you. What if you install ipfs-companion into empty profile and restart the browser (exit and run again against the same |
Only old profile is affected, and I think the problem is caused by the file |
I was about to suggest using Refresh Firefox feature, but it will clear extension data as well. Are you on MS Windows? Did you try solution from https://support.mozilla.org/en-US/questions/1229621#answer-1159980? Not sure if there is any other way to fix this, or anything we can do on companion side. If you want to get to the bottom of this try reporting an upstream issue with |
I may actually have the same problem on Fedora Linux 29. New tabs are unresponsive for 30-180 seconds. I didn't even suspect the IPFS Companion extension. Disabling the IPFS Companion and restarting Firefox makes the problem go away. |
I did more experiments and found that startup delay is proportional to the number of items in
|
@da2x are you able to replicate the issue with an empty profile? (with steps from #655 (comment)). @xuhcc suggested the problem occurs only on older profiles. Would be extremely useful to find a reproducible way to trigger this issue (I've run out of ideas myself – unable to reproduce on my two boxes). |
It does reproduce in a new profile for me after installing the extension. I’ll do some more testing and see if I can come up with better steps. |
FYI I just released v2.7.0 (Stable) – make sure you test with the latest version |
v2.7.0 still causes delay on browser start. But I have found that it doesn't happen if I remove these lines from browser.webRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, { urls: ['<all_urls>'] }, ['blocking', 'requestHeaders'])
browser.webRequest.onBeforeRequest.addListener(onBeforeRequest, { urls: ['<all_urls>'] }, ['blocking'])
browser.webRequest.onHeadersReceived.addListener(onHeadersReceived, { urls: ['<all_urls>'] }, ['blocking', 'responseHeaders']) |
It only happens when the local gateway is running. On Windows, I can also see unexpectedly high resource usage from the Windows DNS Client. After some digging I found a way to cut the number of required DNS queries for DNSLink discovery in half (pull request ipfs/go-ipfs/#5950). While this will probably make DNS server operators and edge gateway devices happier, it doesn’t appear to address the browser slowdown nor Windows DNS Client’s high resource usage. It should yield a decent performance improvements on high latency connections, though. I see a way to optimize |
Thanks, this is very useful and makes sense: DNSLink is the most expensive thing we do, so it is heavily cached, but when browser starts DNSLink cache is empty and every new hostname triggers a lookup. Will try to optimize, but would be useful to reproduce this, eg. by throttling DNS responses.
|
@lidel In my case startup delay did not depend on the state of local gateway. I tried to determine what code in request handlers could cause it, but without success. And then suddenly delay disappeared when Firefox Deleloper Edition (which I use for debugging) updated from version 66.0b2 to 66.0b3, so maybe it was a browser bug after all. |
Could be. In recent builds of Firefox Nightly 66 they finally moved storage.local to be backed by indexedDB, instead of serialized to a file in the profile directory: It is possible there was a regression related to those changes which caused the slowdown. |
Closing, as the bug was in Firefox itself. |
Firefox can't load any tab for a 2-3 minutes after browser start when IPFS companion is enabled.
Problem does not occur in Chromium.
OS: Arch Linux
Firefox: 64
IPFS companion: v2.6.3
The text was updated successfully, but these errors were encountered: