Roadmap 0.10, Performance roadmap — wave 3

PERF.40 PartCraft: assembly endFrame finds every joint's instances by a linear search (O(n squared): 0.3 s at 20,000 instances, about 30 s at 200,000)

  • Fix
  • Planned
  • PartCraft

assembly.js:201 looks up instances with find per joint inside endFrame, so placing all is quadratic: placeAll 297 ms at 20k instances in the lab build (open plus build plus place 0.43 s, 3 draw calls thanks to the 0.9 instancing, pick 7 ms) and about 30 s at 200k by the square (the lab run of assembly-200000.partcraft-asm.json did not complete in time; the 0.8.1 release does not open 0.9 assembly files and draws a Mesh, a LineSegments and a new material per instance, view3d.js:395-425). Change: a Map from id to instance built once per frame or kept on the assembly.

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.