Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What I've found recently is that Linux is surprisingly Firefox's achilles' heel. Canvas and WebGL run easily an order of magnitude slower than Chromium.

Check with https://webglsamples.org if you don't believe it. All of it runs capped at 60 fps on Chrome for me, Firefox struggles to break 30 on mid tier settings in aquarium and stutters horribly throughout most of them. I'm sure it's fast at loading static sites, but I wouldn't ever use it to run any web app. On Windows they're both the same though, which is weird to me.



I didn't believe it and after trying those samples, I still don't. All of them run flawlessly for me on FF 104.0.4 on an up-to-date Arch install on my laptop.


Also not seeing any issues, on Firefox 140.0.1 (via Flatpak) on Aeon (GNOME, Wayland). Everything's at my screen's native 165fps (except for the very first aquarium demo, which bottoms out at around 45fps with the maximum number of fish).


Wayland or X11? I'm on Kubuntu and from what I remember reading a while back it may be Firefox using something native on X11 that Chrome rolls its own thing for, but I may be misremembering.


I've been using Firefox since it was called Firebird, and Linux has always been a 2nd zone citizen.

Most Mozilla developers are on Mac, most users are on Windows, so Linux have never been the focus.


Linux should be the focus. Windows Recall is a hell-to-the-no for me, and then having to have 'cloud accounts' to log in on desktops should be demonized. "Oh but you can just run brew for all your .." -- No, no I can't.

FF, being a pioneer of privacy (not anymore, with anonym adds): Go to Settings -> type 'advert', turn that off. FF, being a major player in FOSS, and community (irc.mozilla.org etc), now I think they do matrix

Should get their priorities straight. To me, it isn't about market share, but Linux just reached 5% market share in the US https://ostechnix.com/linux-reaches-5-desktop-market-share-i...

Valve sponsors Arch Linux https://www.pcguide.com/news/valve-officially-sponsors-arch-...

I just switched to LibreFox, which is Firefox without all the extra junk it peddles.

We'd think, by now, with video games having advanced crazy rendering engines, AI dark magic, that browsers would have it together by now.

They don't.


Many Firefox devs are on Linux; however note that not many Firefox users are on Linux (mostly because desktop Linux has a much much smaller userbase than Windows or Mac). About 4% are Linux, looks like 8-10% Mac, the rest Windows: https://data.firefox.com/dashboard/hardware


I note that the GitHub org has two public members, one of which is from Google: https://github.com/orgs/WebGLSamples/people

Google's been doing advocacy where they do things that either only work on Chrome or just magically works faster there, for a very long time.


I've tried perhaps one third of the samples. All of them ran in 120 fps in 3840x2160 px in Firefox on Linux on my machine. Perhaps it is a configuration problem. My screen has a 120 fps refresh rate, so it probably is capped there.


thanks for the benchmark tip. FWIW, firefox 140.0.4 on Fedora 42 runs pretty much all tests at 60 fps or therebouts.


I'm having a different experience.

  Aquarium: 60fps until 20k fish, where I hit 50fps. 30k at 34fps
  Blobs: maxed out resolution and number of blobs, still 60fps
  Field: 60fps at "lots"
  Fishtank: 60fps with 1k fish and sharks
  Spacerocks: 60fps on lots
  Sprites: 60fps on 10k
System: - FF 140.0.4 - Kernel: 6.12.37 - CPU: AMD Ryzen 9 5900X - NVIDIA 4080S (575.64) - 186 tabs open (mostly YouTube. >20 active)

I get a bit worse on my M2 Macbook Air (128 tabs), but pretty close results.

Maybe you need to open more tabs?


Try indexeddb. Apparently Firefox is faster than Chrome in recent years when it comes to putting items into a database, but my experience with multi-gigabyte databases (the database contains image blobs and metadata for use as a local webapp) is that chrome is far faster than Firefox. I'd rather use Firefox sure to increased indexeddb limits (for mobile devices with limited storage), but it's just that much slower. I have a chrome-based browser installed on my phone just for PWA use.


Hmm that might also be contributing to dogshit Firefox performance on a web app of mine, I'm using that to store and fetch map tiles. Though that's all async so it shouldn't really matter in terms of rendering aside from having to wait a bit longer to retrieve.

But it already lags like fuck even without that part running or anything much at all, while being buttersmooth on Chrome almost regardless of how much I load up rendering. It infuriates me to hell because there is no optimization I can make to get equal or even usable performance.


What's the webapp? Can you file a bug in Bugzilla in Core::Performance with steps to reproduce?

Can you take a profile? https://profiler.firefox.com You can attach it to the bug, or drop it in #perf on https://chat.mozilla.org (Matrix)


I ran some of these in comparison with Chrome, and Chrome was consistently faster, but only marginally (1-20%). I'm actually quite impressed, an integrated Intel HD 620 / 4x2.4 GHz (!) rendering 10,000 fishes at 30 FPS in a webbrowser.


For reference my numbers are for an RTX 4070, Firefox has no excuse for not being able to crack 60 fps on a demo that looks like it's from the late 2000s in terms of graphics.


Isn't the fps capping? I'm pretty confident it is because it won't go above that on my system even when I do a trivial number of fish and my monitor maxes out at 60fps...

  > on a demo that looks like it's from the late 2000
Okay... now I think I shouldn't take you seriously...

The literal visual aesthetics aren't really important for the test. You could place some nicer shaders and it wouldn't necessarily change the compute load. Hell, it could just be highly unoptimized. Benchmarks are mostly about having something static to test, not making something visually pleasing.


I'm half kidding, it's entirely possible to overload any GPU with too many draw calls with the end result not looking like much. These fish would run reasonably well on something from that era though I'm sure, it's no GTA San Andreas.

But no it's not capped at 30, it jumps to like 33, 34 sometimes with those settings, it's capped to 60 like Chrome as well. Probably vsync.


You said 60 before so thats why I thought it was capped. Which matches what I'm seeing when I run the tests as well as others


Is your screen 60Hz? Game loops are normally using requestAnimationFrame [0], which is capped at refresh rate of your display

[0]https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...


Sounds like hardware acceleration isnt working?


I'm running Gazebo at 10 times realtime and inference through cuda, trust me it's working. If Firefox doesn't take advantage of it that's its problem. I've enabled every config setting for acceleration I could find.


Is it possible your os is handing it your integrated gfx on cpu instead of your GPU?


Adding some data points to the sibling comments:

Linux Mint 22 (X11 + Cinnamon)

Firefox 139.0.4

Integrated Graphics (AMD Ryzen 7 5800U)

At 1440p 60Hz monitor, every test that listed FPS showed 60fps, and all others looked the same level of smoothness as Chrome.


I'll test it when I get home, I'm really curious, I've not noticed a slowdown, I am using Arch so I'm not sure if that makes a meaningful difference.


The recently work with DMABUF on Linux might help a lot of things get faster.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: