Babylon is very low and lag on firefox and safari but is fluid in chrome

Hello, I’ve developed an intro part with Babylon: I got a canvas loaded with .GLB objects, then I animated these objects (in translation and rotation) and I removed the control of the camera with the mouse. Everything is very fluid on Chrome on mac and Pc but it’s very slow and jerky on firefox and safari. What did I do wrong?
I agree to share my code but I don’t know how to attach the .GLB files.
Thank you for any kind off help.

How to share assets with playground: Using External Assets - Babylon.js Documentation

Can you try to profile your code with Firefox to see if there is an obvious culprit?

Thank you it’s great, I finally got to use the playground! That’s too coooool…I really love your framework, I put the unformatted code I start in javascript and webgl…you’ll see that it’s a juxtaposition of pieces of code taken here and there in the examples. How could I put the link toward the playground?

1 Like

https://playground.babylonjs.com/#AAL9UA#1 Ho lalalalalalala! It’s so cool and very easy! No major lag…hum…my script?

yes probably something around your script :slight_smile: That’s the super power of the Playground :wink:

You’re pretty convincing! Where should I put my JS lines? In the $(document).ready(function () {} loop or out? Knowing that I have a huge script and a dynamic loading in php (it’s wordpress). I noticed that the lag are larger on 4K screen

$(document).ready(function () {} loop is fine!

inside?

yes sir

Thank you but I still have my problem…what kind of raisons my website is very low on firefox? even wih auto prefixing etc…? how should I include my script?

this part is definitely on the profiler. you need to figure out which code is slowing down firefox

Thank you what is the “profiler”? I’m using to coding in…Fortran…it’s quit far

hit f12, you gonna see a profiler tab where you can run a analysis of your perf

Other option is to share a page where we can see your site running live so we can experiment the slow down

ok the site is on not safe for the moment how could I share you in safty?

http://www.elevate-2020.elevate-fitness.fr/

http://www.elevate-2020.elevate-fitness.fr/

well I was expecting a sample page:) not the entire project

So there is no solution?

looks like you are doing a lot of creation that push pressure on the Garbage Collector:

You should not have any new in the render loop.

Thank very much for your help, it’s cool! I noticed the GC problem but I don’t really know how to solve it…it seems to be a youtube js problem? Is there any conflict with youtube and babylon?
How did you obtain the nice graph?