-
Notifications
You must be signed in to change notification settings - Fork 123
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 opening of singlefile addon saved pages. #89
Comments
It could be a race condition between these addons. |
race condition between any one of those addons (including yours) and my other addons? btw,I have another firefox profile with less addons installed and I saw that umatrix also introduced this issue with the pages . I will try to see how many addons I can keep with your addon and still not get the issue. UPDATE: try it yourself. |
What tool you use to save pages? |
oh I forgot to give the link |
Initial check shows that the saved page generates about 258 requests in less than a second. double it for responses! All of these are "fake-request" and are generated by Firefox. I'm investigating this to improve performance in certain areas but the gain won't be much. |
I understand this. I even suggested as much with the picture I uploaded. what I am asking from you is to maybe optimize your addon too so that number of connections dont affect it this severely. btw how did you track the bogus request? |
Yes that's what i'm doing, investigating and improving.
Commenting out |
@salarcode Hi, I'm the author of SingleFile. On my end, I determined that |
@gildas-lormeau Thanks, that's a good point, the problem is not just onBeforeRequest, there are other listeners as well which I'll look after. |
@salarcode Indeed I did not test all the now infamous webRequest APIs. FYI, I'm going to open an issue in the bug tracker of Firefox, cf. gildas-lormeau/SingleFile#225 (comment). |
did I just start a war? or maybe a new romance? If you guys got married you have to invite me to the wedding. :) I think the http and https are enough for now (ftp is not really alive anymore) and using :///* may (will) interfere with other connections. like ipfs:// and so on. So I think using from minimal and later adding more rules is better that going with :///* . btw should I tell all the other addons that I referenced here about this too? so that they fix it or report to firefox? |
where is this ? |
FYI, I created this issue in the bug tracker of Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1557300 |
Thank you @rezad1393 and @gildas-lormeau the issue is fixed now. Line 41 in 2189794
@gildas-lormeau Thanks, I've also updated the bugzila ticket with more info. |
Can you use http-https instead of |
No it won't, match patterns are limited to http, https, ws, wss, ftp, ftps, data or file. |
it says scheme can take two form I think using http and https specifically is better so that if later mozilla decides to change the coverage your addon doesnt get this bug again but with different schemes. you already added ws wss and so on. so removing * and adding http-https (that is the second form in mozilla docs) is not a stretch. this is just a suggestion. btw thanks for the fast hotfix. I have tested with a small saved file and it no longer has the slowness. |
Well actually Smartproxy should cover as much as it is possible, apart from the local files that are now excluded, the rest should be covered, so any changes from Firefox is welcome. Also ws and wss are mentioned in the list because in Chrome star (*) doesn't include websocket protocols and has be explicitly specified. I see you have already reported to the authors :) good to mention the bugzilla ticket as well. |
you mean your addon should cover ipfs:// protocol? these are I think the best wat is still covering as little as possible but still covering the needed parts. |
I mean the proxy should cover whatever Firefox parses and understands which for ipfs:// case it doesn't. It just recognize it as a protocol.
I disagree, this addon should provide at least the same level of the browser itself provides.
You are forgetting Socks proxy protocol. This means that it doesn't matter the request is http or not, if user wants, he can apply proxy for it using Socks proxy. Also the ProxyAPI that extensions have access to is limited by nature, in Firefox case a handful of protocols are allowed which I have listed above. |
oh yea I forgot the socks one. but ,again, you are the developer and I think you know more than me and should do what you think is best. I was just trying to tell what I knew so that maybe it would help. I am gonna unsubscribe from this now that the issue is resolved. again thanks you for fast replied and fixes. |
No worries, And it is safe to assume whatever implemented by proxy API is web request hence the name webRequest, they can go through a proxy. |
I use singlefile addon to save webpage(after webscrap addon no longer working).
and I have a lot of addon installed.
but I see when I open a HTML page saved with this addon, firefox almost hangs (the html file saved from this addon are one single file with images embedded in this html text)
opening from bookmarked local file address of the saved webpage cause firefox to open a new tab but not load the address for 2 sec and the load the file and then very slow firefox behavior until it completely loads(it is a local file so it is not network connection issues)
I tried disabling addons to see if it helps.
I got to these 4 that enabling any of them caused the issue that I described.
" https://addons.mozilla.org/en-US/firefox/addon/requestcontrol/
https://addons.mozilla.org/en-US/firefox/addon/privacy-pass/
https://addons.mozilla.org/en-US/firefox/addon/ipvfoo-pmarks/
https://addons.mozilla.org/en-US/firefox/addon/smartproxy/"
I can disable other 3 but I need your addon.
can you check this out and see if you can optimize it so that it works better?
this is not smartproxy fault(at least not all of it) but still it is a issue that made me wonder what other pages are slows by this addon (which I still love and use).
BTW this doesn't happen with only smartproxy installed so I know it is now all the addon fault but with my profile disabling the addon fixes the issue.
(all other three addons are also like that so maybe that helps find the issue).
I think it has to do with domains because the singlefile HTML file has data: type blob and maybe smartproxy and ip6voo and others are trying to work with domain names and get confused.
with this addon (https://addons.mozilla.org/en-US/firefox/addon/website-information/)
it show this domains (though may not be completely reliable)
even if I put smartproxy in no proxy mode I still have the issue.
The text was updated successfully, but these errors were encountered: