Performance of ScreenLoader.Append in BabylonNative (Android)

I am using SceneLoader.Append to load a gltf file exported from Blender. The file is 628Kb and includes some animations.

I am comparing BabylonNative on Android with BabylonJS in an Android Webview. It takes over 30 seconds to load in BN and under 2 seconds in BJS. By “load” I mean from the Append call until the onSuccess callback is invoked.

Based on this forum post, I tried setting scene.blockMaterialDirtyMechanism = true, and that reduced the load time in BN to about 20 seconds.

Is there something else going on here? Is this expected at this point?

Thanks

Are you running in debug or release? Do you have any textures in the gltf file?

Debug. Yes, most of the file is base64 texture data.

I’ve tried both loading the gltf from a file in the app assets and downloading it from a local server.

Debug is going to be quite slow because mipmap generation is rather slow in debug. Can you try release and see if it’s better?

Yes. It takes 3-4 seconds in the release build.

Is there a way to disable something to speed up the debug build?

If you hard code this line to false, then it will be faster, but you won’t get mipmaps. Hopefully, that’s not going to affect the scenario too much.