Roadmap 0.10, Performance roadmap — wave 3

PERF.33 CivilCraft: opening a project is one 27 to 41 s main-thread task, and every chosen .json is read and parsed whole twice

  • Fix
  • Planned
  • CivilCraft

f.text() then parse then buildSurface then scene run synchronously in one task (27 to 41 s at 500k; LandXML 69 MB becomes a 1.2 GB element tree). Files over 200 MB are refused by design (civilcraft.js:2320), which is honest, but ifc-native-ui.js:112 reads and JSON.parses every chosen .json whole first to sniff it (6.8 s and 751 MB for a 240 MB file that is then refused), so every project is parsed twice; the LandXML reader cannot take the 692 MB 5 M-point file (over V8's largest string) and fromJSON caps at 2 M points. Change: a 4 KB sniff, the parse and surface build in a worker returning typed arrays by transfer, a streaming LandXML reader (the scale readers row), and progress in the status line. The LAS terrain import is the model to follow: 10.6 M points streamed in 2 MB pieces, thinned to 106k, 2.3 s, no long task (wave 2 stopped at the elevation-unit dialog; Import stays disabled until it is answered).

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.