Poor instance performance on Firefox

Hey there!

I noticed regular instancing is very slow on Firefox. I am using Windows with a good cpu and I get 30fps on this PG on firefox while Chrome is at a stable 60fps:

Does someone reproduce this behavior?

I’m running Ubuntu 22.04 and indeed even on my side there is a big diff. Running at a solid 120 fps on Chrome, and oscillating between 30 fps and 70 fps in Firefox


I did a performance profile and couldn’t find anything unusual. Maybe firefox is just slower somehow? :thinking:

I guess it’s happening at a lower level, which is the direct approach of these browser toward JS engine and WebGL bindings, which are not exactly the same…

Yup, that’s weirdo. Never noticed this but I suppose you’re right. Kind of makes me feel of the difference between using instances and thin instances on lower end cpu/gpu (where the lower end performs better with instances than thin instances). I think you should cc this to the Team, may be @RaananW ?

I can’t quite reproduce, but chrome tends to perform better than firefox.
Would be interesting to know what renderer is used in both browsers when you are using them. Is it only happening with instances, or is it apparent with other scenes as well?

It is definitely not as noticable in other contexts, but I agree that Chrome is generally faster than Firefox.

For the renderer, they both use the WebGL2 renderer with the latest BabylonJS version

@CrashMaster I recently discovered that in firefox Parallel shader compilation is not supported. I’m using popOs, and 4500u CPU with integrated graphic card. On Chrome it’s supported

Perhaps this is the case?

1 Like

Interesting! But then I would expect the framerate to increase at some point when all shader compilation is done :thinking:

MacBook Pro m1 max, OS Sonoma 14.4.1 here.

Firefox 127.0.2 - 40-50 FPS
Chrome 125.0.6422.77 (Official Build) (arm64) - 120 FPS

Bullshit confirmed.

EDIT: I switched back to Firefox to close it and it was running at 100 FPS. Restarted it and it is stuttering at the beginning and after 10 seconds it runs w/o stuttering but still at lower FPS as in Chrome.

Same, it’s quite weird, honestly I wonder how OpenGL bindings are done on Firefox side. What I cannot understand is the variability on Firefox side.

For example (still Ubuntu 22.04) I have this GPU Particles Experiment that I carry everywhere to test some configs… It’s really pure WebGL here, no Babylon, even the physics compute is on GPU (rendering custom textures to handle position, velocity, pressure, etc) so it’s a good way to test pure GPU side…

  • Chrome : Static 120 fps (and the FPS is not targeted, the update function is directly calling a requestAnimationFrame(update) at the end of itself)
  • Firefox : Totaly chaotic frame rate jumping from 60 to 140 fps over time (and I’m running an average on 30 frames, the actual framerate is even more chaotic). WTF is Firefox doing, good question ^^

Now this is getting weird:
with the particles stuff I get maxed FPS in both browsers :smiley:

1 Like

i get 60fps in both chrome and firefox for the particles experiment

For the OG’s PG ,

chrome is 60

firefox stutters as it builds the scene. it starts at 60 , as spheres are being added it starts to drop , 50’s , then 40’s then 30’s and at that point all sphere are generated the stutter stops and it runs at 60 smoothly.

so if you comment out the material freeze line :


and hit play it seems to not have that slow down , i dont save and refresh the browser , i just hit the play button again and again.

then uncomment it , and I see the behaviour described in my post above coming back … slow down as spheres are added , 50’s , 40’s , 30’s … then running normal…

i tested doing this several times each time with it commented out or not and it does seem to be the main culprit , but I have no idea why. i just took a lucky guess testing changing the code a little and noticed this pattern.

I’ve noticed a clear fps difference between Firefox and chrome on my project too. No idea why though

Because Chrome is a Ferrari and Firefox a Volvo :smiley:


That’s probably the explanation for the problem. It is just sad that Firefox can’t compete with Chrome on so many areas :confused:

1 Like


No way bro :smiley: :smiley: :smiley: Thx!


I imagine a random guy, later on… Having an issue with Firefox, finding this topics which name matches exactly his issue, sees it at "Solved :heavy_check_mark: ", can’t way to see the solution, and reads “Because Chrome is a Ferrari and Firefox a Volvo” :joy:


This is really a good one! LOOOOOOL