forked from kimminsung/dwg-dxf-viewer-sample
Mirrors hmwebviewer's rust/dwg-wasm change into the sample: the wasm artifact plus the parser wrapper, which now goes through parse_dwg_json and JSON.parse instead of the JsValue-returning parse_dwg. Building the whole result as a serde_json::Value tree pushed the live wasm heap near 2.9GB for a 19MB drawing, and the allocator's cost grows with that heap, so parsing went quadratic — 354s, with the tab frozen throughout. Streaming one entity at a time keeps it linear: 2.5s. The same build also fixes three bugs that drew stray 4km grey shapes where two CF-PATT SOLID hatches should be. Max hatch span 4655 -> 110. Adds two docs recording both investigations, in the format of the existing ones: measurements, the hypotheses that were ruled out, the fixes, regression checks, and the MPL-2.0 position (acadrust is unmodified, so no new source-disclosure obligation arises). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>