Well my project to munge my old Dialog extension into an XR-Portal is progressing. I have ripped out stuff which now have no meaning, like having modal sub-panels & and an orthogonal camera for having flat dialog in front of the scene.
Also modernized:
- ES 6
- Re-generated fonts with TOB 6, so can use new Clone Factory now built into QI 2
- Am using QI.mesh, so can do various animations in privileged mode, with scene level animations suspended.
- Prepping for PBR materials.
I have now gone back to the old test scene and modified it to test changes before trying make the portal.
It works against the new library. This test is really overkill as far how big & complex it is, but that also makes it good for profiling. The old test page (re-)created all the geometry every time you clicked on an item button in Menu & was kind of sluggish. I changed to building all the panels in advance, & only enabling / disabling in the click.
Clicks are now all under 0.25 secs, but it now takes 7.11 seconds to initially display. It is doing 2186 clones in that time for all the letter meshes. Those clones are then merged by material / panel to bring down mesh count.
With all this processing concentrated in one place, I tried it with profiling turned on. The top item was _markSubMeshesAsMiscDirty()
. This is getting called 2450 times, so avoiding calling it so often might be advised.
The CPU is all self timed, not in anything it calls. What is calling _markSubMeshesAsMiscDirty()
, the cloning or the merging? What class is it even in? Usually methods named mark do not actually do much.