Roadmap 0.9, Fixes
FX.142 CadCraft: Plans.dwg (200,000 3D faces) and any DXF over about 70,000 entities failed to open with "Maximum call stack size exceeded"
Built in the lab. Two readers appended whole lists with push(...list), which puts every item on the call stack. (1) model3d.js:187 and :213 (split3d): the 3D faces a drawing's block references place, up to MAX_PLACED = 200,000, so Plans.dwg (288 objects, 50 blocks) failed in /use 0.8.2 with "Could not open Plans.dwg" after the worker had read it; wave 2 counted that open as accepted because the heap grew. (2) dxf.js:102, :162-165, :479: any DXF from about 70,000 entities (a 15 MB file) threw the same RangeError with no message. (3) The same spread in io.js:1291 (ModelCraft, and CadCraft's m3d copy) for a flattened component. All use a loop now. Measured: Plans.dwg opens in the lab build in 7.8 s (4.8 s blocking, one 4.6 s task placing the 200k faces into the 3D tab, heap 518 MB: that cost is PERF.9's); a 19 MB DXF (137,851 entities) that crashed reads in 1.4 s; 1,000,000 entities (122 MB) read in 10 s and 2.1 GB in Node, so the next wall is memory and the one-string reader (wave 3 scale rows). bin/test-cadcraft.mjs 2,847/0. Other spread-into-push sites that take whole lists remain in bimcraft res-skeleton.js:349, res-views.js:282, dwg/nongraphic-write.js:332 (every copy) and lib/cabinetcraft cornerdrill.js:113: small lists today, worth the same loop when touched. Found by the wave 3 scale and 2D tracks (docs/0.9-sessions/perf-wave3/scale-1000x.md, apps-2d.md).
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.