Roadmap 0.10, Performance roadmap — wave 3

PERF.38 ModelCraft: edits, undo, exports, autosave and the guide card do whole-model work on the page thread (500k faces: move 3.3 s, undo 2.7 s, OBJ export 12.8 s)

  • Fix
  • Planned
  • ModelCraft

Measured in /use 0.8.1 with m3d-500k-faces (tools/perf/apps3d-modelcraft.mjs): import 9.7 s (9.1 s blocking, one 5.3 s task; 50k is 3.1 s), heap 992 MB (about 2 KB per face; the 5 M-face GLB crashed the renderer tab, the 177 MB OBJ is refused by MAX_TEXT after decoding it); moving a placement 271 ms (GLB) or 3.3 s (OBJ, because every edge is drawn sharp without normals: 757k edge lines), undo 2.7 s (restored definitions rebuild their geometry), Model.change calls snap() twice with meshes as base64 (model.js:2408, mesh.js:751/1029; the snapshot row); the guide card's shells() costs 1.9 s = 16 % of the import, polled by setInterval(syncGuide, 400) (modelcraft.js:3151, firstmodel.js:29), and the MeshDef.faces getter (model.js:98) converts the whole mesh on every read; exports block the page: GLB 8.5 s, OBJ 12.8 s, DAE 3.2 s, the file text 2.7 s / 43 MB, and autosave shows as a 2.6 s long task in idle. Change: writers and snapshots in a worker, the guide card from cached counts, faces as typed arrays, OBJ normals computed once so edges are not all sharp. Healthy: picking and hover 0 ms (BoxTree; the MeshPicker tree builds in 336 ms), 90 draw calls, linear import.

Add a comment

Community comments

No comments yet

Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.

Sign in or create a free account to add a comment.