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

I didn't know that. Why would firefox be slower than say chrome when if you use WebGL, the work is being done by the GPU anyway?


You have to shuffle heaps of data between Javascript and the gpu, I’ve found Firefox’s js engine to be slower at doing that. Firefox also seems to call the garbage collector much more often, and do it’s business a bit slower.

Normally you don’t notice, but trying to keep things at 60fps it shows up rather quickly.

N=1


If you have a nice reproducible case of the garbage collection problem, please file a bug https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&comp... and I'll take a look. I've seen some similar issues, but I don't have anything good to work against right now. (The first thing I'll do is grab a profile with https://profiler.firefox.com and that'll immediately tell basically what's going on. You could grab one too, and that'll be useful even if there's not an easy way to give me a reproduction.)

There's also a very recently landed change that might help, if the problem happens to be excessively long minor GCs (which is what I've seen with similar sites): https://bugzilla.mozilla.org/show_bug.cgi?id=1751162

Shuffling data to the GPU could be an interesting case too, but that's not handled by the JS engine itself so I'm not as familiar with how that works. It sounds like it might be worth a bug if there isn't one already (and feel free to file; we'll triage and determine if it's a duplicate.)


Ok so what's slower is the JS engine which is a more reasonable claim. My experience is it depends on the types of work your doing but in general, indeed, chrome seems faster. But Firefox has improved a lot with quantum.


no GPU drivers do not support webGL natively.. Although gecko use Angle from google, 3D rendering is a multifactorial problems that can be optimized from many aspects of a web browser (display lists vs immediate rendering, various caching systems, direct compositing, a lot of low level optimizations, reducing memcpys, etc)


FWIW ANGLE is only used that way in Firefox on Windows.


Perhaps Chrome utilises the GPU more efficiently than Firefox does.




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

Search: