Roadmap 0.10, Performance roadmap — wave 3
PERF.35 MarkupCraft and TakeoffCraft: a 2,000-sheet set builds every row and canvas up front, TakeoffCraft rebuilds the list on each switch, heap reaches 1.66 GB
Measured on plan-set-2000.pdf (2,000 sheets, 99 MB; pdf.js opens it in 2.1 s): MarkupCraft renderSheets (markupcraft.js:1404-1426) builds all 2,000 li plus canvases at open and calls store.onSheet(key) per sheet (sheets times markups); TakeoffCraft showSheet (takeoffcraft.js:362-380) rebuilds the entire sheet list with replaceChildren plus a pass over every mark on each switch: switch p50 345 ms and 5.2 s blocked over 20 switches at 2,000 sheets (MarkupCraft 91 ms, 1.9 s); 14,000 DOM nodes and 2,000 canvases at open; heap 855 MB, 1.66 GB after scrolling the thumbnails, 1.49 GB after Find; page.cleanup() is never called. MarkupCraft Find is sequential (73 s for 2,000 sheets, 37 ms a page) and textCache is unbounded. Change: a virtualized sheet list (rows and thumbnails only for what is visible), keyed updates on switch, page.cleanup() for pages out of view, Find in batches with a bounded text cache. Targets: switch p95 under 150 ms, heap under 400 MB. Healthy: a 300k-segment sheet pans and zooms at 16 ms frames, 10,000 markups on one sheet cost 124 ms and keep 16 ms frames, TakeoffCraft 10,000 marks in 29 ms and quantities() in 0.8 ms.
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.