3 ms·
I have a theory why people have dissenting views on the performance of Firefox. I have a laptop dedicated to doing business online. Firefox has no addons on t
by LinuxBender 5y ago
I have a theory why people have dissenting views on the performance of Firefox. I have a laptop dedicated to doing business online. Firefox has no addons on that machine. Some websites are painfully slow and my laptop fans kick on. I have debugged these issues and in every case it was javascript bogging down the CPU's, all 8 cores! gaming laptop I am not a web developer, so it is perhaps unfair for me to pick on the quality of the javascript.
Disable javascript and well... the site isn't usable any more for business transactions, but the slowness and CPU load vanishes. The website becomes snappy, highly responsive and easy to browse. The fans spin down and memory usage goes way down.
I've never used Chrome. Does chrome not ever get bogged down by javascript? Do they have a different javascript library/engine? I assume they must. Can you change the javascript libraries used by Firefox and Chrome? Apologies in advance if this is a dumb question.
- bigyikes 5y agoChrome uses V8, which is the same JS engine that Node is built on top of. As the name implies, it’s sort of wicked fast. IIRC Firefox uses their own engine called Spider Monkey. I don’t know of anything outside of Mozilla which uses it. I have a hard time imagining it being faster than V8, but I actually have no idea — will need to go look at some benchmarks.
- andai 5y agoThere used to be a big difference (in JS engine speed) but it's small recently. Where there is still a difference is in the UI code. Not necessarily operations being slower in Ff, but ordered in such a way to appear slower. For example, when you press ctrl+n, chrome instantly creates a new window, then spends the next second or so (depending how old your computer is) painting the UI. On Firefox though it seems like nothing is happening for an entire second, and then the window emerges fully painted. So even tho the total time is about the same, FF feels much less responsive due to this design choice. I also noticed Firefox spent a much longer time (a fraction of a second, but perceptible, and multiply that by thousands of clicks a day) before it would even (apparently, again -- not sure whats going on inside) begin loading a page, which was frustrating. I verified this was the case in the web inspector's network performance tab (there was an mysterious delay before the first network request).
- Sayrus 5y agoI've been experiencing delays too but only on the first request. This was due to uBlock Origin initializing. On mobile, this load time adds up really fast as it takes around 5 to 10 seconds for uBlock to load. In the mean time, requests are configured to be delayed. The aggressive Android memory cleaner doesn't help as anytime you close your browser, it reloads again. All this to say, you might have an add-on delaying network requests to match them against a blacklist, save metadata or whatever the add-on is supposed to be doing.
- cpeterso 5y ago> Firefox uses their own engine called Spider Monkey. I don’t know of anything outside of Mozilla which uses it. Some non-Mozilla projects do embed SpiderMonkey, including Bloomberg (since 2001!), MongoDB, CouchDB, and 0 A.D. https://discourse.mozilla.org/t/survey-where-are-you-embedding-spidermonkey/77988/ https://discourse.mozilla.org/t/survey-where-are-you-embeddi...
- missblit 5y ago> Does chrome not ever get bogged down by javascript? Yes. This is pretty subjective as a user, but I'd classify Chrome as slightly better here. They're close enough that it doesn't usually matter unless you're playing JS based games or have a potato for a computer. > Do they have a different javascript library/engine? Yes, Chrome uses V8, Firefox uses SpiderMonkey > Can you change the javascript libraries used by Firefox and Chrome? No, not easily. It's all open source so technically you could with enough effort. But for example Chrome relies on some shared GC code between Blink and V8 [1]; I expect various feature needs like this would make swapping for SpiderMonkey infeasible. [1] https://v8.dev/blog/high-performance-cpp-gc https://v8.dev/blog/high-performance-cpp-gc