The UI is created with the online playcanvas editor then exported to a web bundle. This produces a config.json and one json file per scene. During run time, the scene is loaded with pc.Application.loadSceneHierarchy.
Although most of the UI entities are hidden at the start, pc.Application.loadSceneHeirarchy creates them no matter enabled or not.
We modified the engine code to find more details, and now we know:
- loading and parsing the scene json file takes around 1.5 seconds (the json file is 1.6MB ToT);
- creating entities and components takes around 3.5 seconds;
- component initialization takes around 1.5 seconds;
Above data is from and older phone (presented 2014, 3GB RAM, Snapdragon 801).
The problem is recreating the UI without playcanvas editor would take a lot time, so we really want a better approach to solve this.
EDIT: We’re now trying to reduce the entities used