BabylonNative Ammo.js limitation or unoptimized?

In app I have 20 cubes drop to ground box with bounce some times and reset position/angularSpeed/linearSpeed
In case 10-15 starts app can provide 12 fps, then 20 fps, than 30 fps, than 40-50 fps and stable other runs with 40-60 fps
All meshes have single StandartMaterial with diffuse color only
IMPORTANT: web engine with 100 cubes works with 58-60 fps
PS: I can’t repeat low fps state. If I wait more than 2 minutes fps smooth changes from 20 to 40 fps in 40-60 secs

Probably you could add Inspector and see what changes with time by chart:

image

When you know what changed and when fps is low it will be easier to debug the trouble.

BabylonNative app? This is droid build on device
@Dok11 Это нативное приложение на дроиде (плеер) для js кода

cc @Cedric and @bghgary

I don’t know for sure, but there are a couple of potential issues:

  1. JIT is probably not enabled
  2. Non-WebAssembly version of Ammo.js

Doing JS heavy things (like non-webasm physics) with Babylon Native on mobile (especially on iOS) may run into performance issues.

What JS engine are you using for Android? I’m assuming V8?
Are you using the WebAssembly version of Ammo.js?

V8, Ammo.js from BabylonNative github

I believe the version of V8 we have on BabylonNative GitHub is not using JIT and Ammo.js is asm.js.

Aborted (no native wasm support detected)
How check is JIT enabled?

I’m not sure. I haven’t looked into this yet.