Roadmap 0.10, Performance roadmap — wave 3

PERF.29 CadCraft: hit test, snap and hover pick are O(n) on every pointer move (461 ms a move at 1M entities; 40 of 43 s blocked during a pointer sweep)

  • Fix
  • Planned
  • CadCraft

view.js:538-607 plus moveCursor (cadcraft.js:925) run view.pick over every entity on every pointer move: pick 1.2 / 30 / 461 ms and snap 2.2 / 31 / 314 ms at 10k / 100k / 1M entities; a pointer sweep across the drawing is blocked 1.1 s at 100k and 40 of 43 s at 1M; 54 to 80 % of the zoom and a Discord member profiles at 1M is the pick, not the drawing. Change: the same spatial index as the redraw row (grid or R-tree of entity bounds), one pick per animation frame at most, snap candidates from the cells under the cursor. Target: pick under 5 ms at 100k.

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.