Bad loading performance on Chrome

When setting up scene and creating an engine I’m seeing a big performance difference between Chrome (or chromebased browsers) and Firefox. It boils down to the time it takes to perform “getContext” in ThinEngine.
In Firefox it takes 10-20ms when putting in a canvas or a GLContext
In Chrome it takes 80-100 ms when putting in GLContext and >10000 ms (10sec !!) wen putting in a canvas.
I think there is something wrong. Disabling some of the options/tests (“disableWebGL2Support”, “failIfMajorPerformanceCaveat”) didn’t change anything

This is not what we are experiencing (fortunately :slight_smile: ) so it might be a local issue on your side. and if getContext is slow, this is unfortunately not something the Babylon engine can handle, you d have to open a ticket on the Chromium bug tracker.

1 Like

What OS/browser/version are you using to test Chromium?

1 Like

I’m on Windows 10 (1809, 64-bit).

The long initial loading happens on
Chromium 93.0.4526.0 (Developer-Build) (64-Bit) and
Edge 92.0.902.55 (Official Build) (64-Bit)

I’d like to continue on this thread as I’m also getting really long loading times for the following action:

Part of the SETUP.MeshLoader (header above is just checking some attributes)

    let model = SceneLoader.ImportMesh('', path, filename, scene, function (mesh) {
        if (meshProcess === true) {
            tNode = contLoadGeom(scene, mesh, flip, scale);
        if (claarFilter === true) {
            claarProcessGeom(scene, mesh, flip, scale);

Initiated by the following

    let meshLoadAzur = () => {
        let model: TransformNode = SETUP.MeshLoader(scene, {
            path: '../assets/models/azur_model/',
            filename: 'azur_11.glb',
            scale: 50,
            flipUp: false,
            claarFilter: true,
        }) as TransformNode;

I can provide a screenrecording from this issue if necessary.
Please let me know what you need to further evaluate this.


Do you still see it with the latest beta ? this is probably a different issue related to loading glb files not creating a context and I d bet on the srgb issue.


Thanks man,
I had the latest versions from when I started the project fixed to

"@babylonjs/core": "^5.0.0-alpha.65",
"@babylonjs/inspector": "^5.0.0-alpha.65",
"@babylonjs/loaders": "^5.0.0-alpha.65",
"@babylonjs/materials": "^5.0.0-alpha.65",
"@babylonjs/serializers": "^5.0.0-alpha.65",
"@babylonjs/viewer": "^5.0.0-alpha.65"

After changing to

"@babylonjs/core": "preview",
"@babylonjs/inspector": "preview",
"@babylonjs/loaders": "preview",
"@babylonjs/materials": "preview",
"@babylonjs/serializers": "preview",
"@babylonjs/viewer": "preview"

and running

npm update

in the console, everything loads way faster.
Thanks again!

1 Like