Upgraded to angular 10 - runs slower - CommonJS or AMD dependencies can cause optimization bailouts

WARNING in C:\proj\branches\am5\airmarshal\src\app\shared\services\hovermap\payload-connection.service.ts depends on ‘sdk/rocos-js’. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: Angular

WARNING in C:\proj\branches\am5\airmarshal\src\app\local\settings\main-settings\main-settings.component.ts depends on ‘@env/environment.prod’. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: Angular

WARNING in C:\proj\branches\am5\airmarshal\src\app\shared\services\renderer\object-render\aircraft-render.service.ts depends on ‘babylonjs-gui’. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: Angular

WARNING in C:\proj\branches\am5\airmarshal\src\app\shared\rocos-ui\render\renderer.ts depends on ‘babylonjs-materials’. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: Angular

WARNING in C:\proj\branches\am5\airmarshal\src\app\shared\rocos-ui\render\renderer.ts depends on ‘babylonjs-loaders’. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: Angular

WARNING in C:\proj\branches\am5\airmarshal\src\app\shared\utils\logger.ts depends on ‘object-sizeof’. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: Angular

We had babylon 4.10-beta installed and upgraded to 4.10 as well as upgrading angular from 9 to 10.

If I get the es6 babylon libraries it should fix these warnings ?
Not sure if I’ve made a mistake upgrading - I went
npm update babylonjs npm update babylonjs-gui npm update babylonjs-loaders npm update babylonjs-materials

With these upgrades, our angular app run at 15fps down from 30 fps on our android device ( galaxy tab 2) and was hoping if I could fix the warning then I’d get the speed increase.

Hi,

first - I am not sure this is the reason for FPS/preformance reduction. This would be a reason for lack of package optimization but not of the app performance itself. I can’t think of a way a commonjs package will hurt real-time canvas performance.

Having said that - this is an uneducated answer. There might be something in your app that optimizes the performance based on a build configuration.

our ES6 packages (@babylonjs/***) are neither commonjs nor AMD and should be the ones to solve those warnings. There might be some small changes you will need to implement, but I can say that the result will be a smaller package size and a faster delivery process - and this is what we all want,m don’t we? :slight_smile:

1 Like

Hi,
I updated babylon only - result:no slow down
I updated to angular 10 only- result: It runs slower.

It seems that angular 10 is somehow causing our app to run slower.
Tried delete mod_modules and “npm install” - made no difference.

Might leave angular update for 6 months and try again then.

Might be related to events passed to the canvas or some form of a constant redraw done to the angular component?

1 Like