Sure, i completely agree… I did more tests on the main application and I confirm the performance degradation, but, in the meantime, I make a simple test application related only on babylonjs code and no performances degradation is present!
So the point seems to be related on some specific aspects of my application…
In any case, I write some details about my scenario, maybe they could be usefull…
First thing, when I speak about “performance decrease”, I mean an empiric evaluation, I just refer to “CPU usage” of google chrome, in one case (v 4.2) it stays stable in the range of 15-20% in the other it stays fixed to 98-100% (v 4.1 and 5alpha). So I haven’t made any fps measurament for now, but the difference seems to be not marginal and constant in time.
The application is written in angular 12 and is based on a dynamic dashboards structure, with the possibility to insert some widget related to different tasks; the babylonjs related widgets import some .stl file with “SceneLoader.ImportMesh” representing some tools machines and other stuff; after we move some components based on different factors and conditions (external info based on webstomp and other).I’ve attached “application example.png” just to give an idea of the concept.
Related to these widgets there is a dedicated angular service that handles the single babylonjs engine and all the related points as rendering and camera handling as described in the documentation of multi canvas and multi scenes.
The application is based on nx workspace, with the babylonjs code located in a dedicated lib, in attachment the package.json file.
Some critical package beyond babylonjs are:
angular-gridster2: for handling the dashboards structure
ng-dynamic-component: for handling the dynamic creation of the component inside the widget of every dashboards
Now the test! Off course, the code of the application is identical apart from babylonjs version.
- File App_v42: Application with v 4.2 and very good performance
- File App_1_v5: Application with v 5 in exactly same condition and poor performance (CPU usage)
- File App_2_v5: Application with v 5 with “less stressful” condition and quite poor performance (CPU usage)
- File App_3_v5: Application with v 5 with “less stressful” condition and quite poor performance (CPU usage)
- File Test_v5: Test application with v 5 of babylonjs; the application reproduce the code of the lib related to babylonjs, with static defined canvas; so WITHOUT handling the dashboards structure and dynamic creation of the widgets. The performances are good with no significant difference compared to V4.2.
So I see that is not easy to understand the motivation of the performances change, it seems related to some specific aspects of the application…if you think that it is worth investigating the point more, I can gladly prepare a small test application with the dashboarding and widget modules integrated with the babylonjs code, in any case it could be interesting for someone…