Release planning

CadCraft 0.11 impact map

Every fix and feature lined up for 0.11, and what each one touches: which apps, and which layers of the stack.

ProjectCadCraft
Sheet0.11 impact
Items799
Date2026-11-22
181Fix
383Feature
8Spike
35Platform
3Site ops
153Sanity check
36Decision
0Note
≈ 96days in the written 0.11 plans
  • Planned 45 on the plan for the release it is filed under
  • Built 449 built and working in /lab (the dev builds). Whether the public has it is its reach: "in the lab", "Live" (the last gate) or "switched off"; see docs/REACH-LIVE.md
  • Partly built 32 part of it is built in /lab; the rest waits (see "Waits on")
  • Promised 3 the live site already says it is coming
  • Moved 2 moved here from an earlier release or wishlist
  • Found 2 bug found after a release shipped; fixed in a point release or the next one
  • Candidate 49 recommended in a spike or session log; owner to choose
  • Community please test 143 built and in /use; a Discord post gives the steps and the expected result and asks people to try it on their own devices, files or know-how
  • Decision Time 74 a decision, check, file, key, flag or go only you can give; folds into the list once answered

Built means built and working in the lab. Live means the public can use it, and is the last gate: 3 Built · Live, 446 Built · in the lab.

Sheet 1 · impact areas

Where 0.11 lands

How many items touch each app and each layer, by kind. One item can touch several areas, so the rows add up to more than the item count. Pick a row to filter the schedule below.

Impact areaFixFeatureSpikePlatformSite opsSanity checkDecisionNoteAll
Apps
CadCraft 89 154 4 10 1 51 11 – 320
BimCraft 79 178 5 10 2 70 18 – 362
ModelCraft 60 81 2 10 1 41 4 – 199
MarkupCraft 46 59 2 9 1 18 1 – 136
TakeoffCraft 50 59 2 9 1 21 3 – 145
CivilCraft 69 131 3 11 1 35 3 – 253
DetailCraft 58 61 2 9 1 26 2 – 159
PartCraft 57 78 2 9 1 37 3 – 187
Studio 12 43 3 9 1 30 5 – 103
SuperCad Studio 9 109 2 7 – 23 5 – 155
Layers
Site and services 15 25 – 10 2 2 8 – 62
Desktop host 7 22 2 10 – 7 2 – 50
App shell 25 32 – 7 – 4 2 – 70
App code 69 193 4 6 1 9 16 – 298
Our engines 8 71 3 1 – 4 10 – 97
Vendor engines – 2 – – – – 1 – 3
Drawing surface 1 – – – – 1 – – 2
Help and words 2 9 1 – – 2 – – 14
Tests and tooling 4 9 1 3 – 4 2 – 23

Sheet 2 · schedule

Every fix and feature

Grouped by track. App chips carry each app’s layer colour; Studio is in ink. "Waits on" names what has to happen first; the small lines under it say who asked and where the item is written up.

Add an item Fork map (Rust and C++ forks) The roadmap

Issues sync every 10 minutes; last sync Nov 22, 2026 10:40 am.

ItemWhatAppsLayersStatusDaysWaits onIssues
Fixes 127
FixBot obtainedFX.414 Link to FX.414Comment on FX.414 PartCraft: an assembly file over 50 MB was refused as "too big to be a part"

Found by scale-11 (PERF.20, 2026-11-20): openFile refused any file over 50 MB before it looked at the name, so the 62.6 MB assembly-200000.partcraft-asm.json was refused although readAssembly reads it in 406 ms and has its own, clearer message about the 50,000-part limit. A part never needs more than a megabyte or two; an assembly may list 50,000 placed parts. Now a .partcraft-asm.json may be up to 400 MB (past it: "That assembly file is over 400 MB; PartCraft opens assemblies of up to 50,000 placed parts."), any other file stays at 50 MB. Beyond 400 MB would need readJsonFile from textin.js, not built. Session model-part-11.

PartCraft App code Built · in the lab – – docs/0.11-sessions/model-part-11.md
Performance roadmap — wave 1 5
PlatformPERF.2 Link to PERF.2Comment on PERF.2 Apps: the 532 KB language catalog inlined in every app page (65 % of the HTML, never cached) as a cached static file per build and locale

Measured 2026-11-08: /use/cadcraft is 828 KB of HTML (205 KB gzipped) and 532 KB of it is <script id="cc-lang"> (8,818 strings; cmd 83 KB, shell 82 KB, frame 32 KB, m3d 28 KB...), regenerated and sent on every page view because the page itself is dynamic. Readers: assets/js/app-shell.js, app-boot.js, app-lang-boot.js, i18n.js (one copy per app), supercadcraft.js, super-tools.js, exact-client.js; all read #cc-lang synchronously. Plan: Lang::bootTag writes a small tag and the catalog moves to a classic script /assets/apps/<slug>/<version>/lang/<locale>.boot.js?v= (or a generated file under a cache folder for the shell part) that sets window.ccLangCatalog, loaded with the week-long asset cache; the readers take window.ccLangCatalog first, #cc-lang second (so frozen releases and the browser edition keep working). Second visit: 0 bytes for strings instead of about 100 KB gzipped. Releases are frozen so the file can be written at release time (bin/release-app.php); a Discord member builds generate it on demand keyed by the lab stamp. Keep Lang::use (PHP needs the shell strings for the bar and Settings). Built behind PERF_LANG_FILE (off). The catalog tag becomes a cached script file per build, language and content hash (/assets/lang/cache/); a classic script writes the identical #cc-lang tag, so no reader changed (catalog text compared character for character, 8 apps, /use and /lab). Measured on /use with the switch on: the page is CadCraft 977 to 217 KB decoded (232 to 39 KB on the wire), PartCraft 922 to 190, MarkupCraft 372 to 143. Cold first view moves the same catalog bytes in one more request (wire 2.84 to 2.78 MB CadCraft); the saving is every later page view and the HTML parse. /lab files are no-store by the site's rule, so no repeat saving there. Not built: the per-namespace split (PERF.55). (perf-start-10 2026-11-13: docs/0.10-sessions/perf-start-10.md; numbers docs/results/0.10/)

– Built · in the lab – Owner: flip PERF_LANG_FILE=1 (or lab) in .env
PlatformPERF.3 Link to PERF.3Comment on PERF.3 Apps: the "Save for offline" file list (128 KB inline, 2,054 files stat-ed per page, 42 ms) fetched on demand instead

Measured 2026-11-08: every app page carries <script id="cc-offline"> (128 KB: the URL of every file the service worker would save) and PHP spends 14 ms in AppBuilds::offlineFiles plus 28 ms in tools/shell/offline-size.php (a filesize of all 2,054 files) to build it. It is read only when a person clicks Save for offline (assets/js/app-offline.js) and by help-panel.js for the listed-files check. Plan: keep key/page/bytes in the tag; move urls to a small endpoint (or a static JSON per release written by bin/release-app.php, a Discord member builds on demand) fetched when the button is pressed; cache offline_size per release (frozen) and per lab stamp for a Discord member. Saves about 15 KB gzipped per page view and 42 ms of PHP. Built behind PERF_OFFLINE_LAZY (off). #cc-offline carries only the key, the page, the endpoint and the size (0.1 KB, was 36 KB MarkupCraft to 189 KB BimCraft); the list is fetched once when Save for offline is clicked (the page's own URL with ?cc-offline-list=1). The size for the tooltip is cached on disk, so the 20 to 86 ms folder walk is 0.2 ms. Same list as before minus other languages (0 missing, 0 extra, 8 apps). Real Chromium: list fetched 0 times before the click, 1 after, ends Offline ready. (perf-start-10 2026-11-13: docs/0.10-sessions/perf-start-10.md; numbers docs/results/0.10/)

– Built · in the lab – Owner: flip PERF_OFFLINE_LAZY=1 (or lab) in .env
PlatformPERF.4 Link to PERF.4Comment on PERF.4 Apps: modulepreload hints for the static import closure, so the import waterfall is one round trip deep instead of 4 to 8

Measured 2026-11-08 (static import graph from each release's entry module): cadcraft 281 modules, depth 6 (99 at depth 1, 104, 51, 21, 4, 1), 4.6 MB; bimcraft 422 modules, depth 4, 6.5 MB; partcraft 269 modules, depth 8; markupcraft 78 modules, depth 3. The browser only discovers level n+1 after level n arrives, so each level costs a round trip even with HTTP/2 (PERF.1). Plan: AppBuilds::headTags adds <link rel="modulepreload" href=...> for the entry's static closure (regex over import/export-from lines, cached per release in storage/ and per lab stamp for a Discord member builds; about 25 KB of tags for cadcraft, gzips well). Dynamic import() sites (38 in cadcraft, 97 in bimcraft) stay lazy. Measure with tools/perf/startup.mjs before and after; most valuable after PERF.1, still a win on HTTP/1.1 for the small deep levels. Built behind PERF_PRELOAD (off), generated: AppBuilds::preloadHrefs follows static imports only (hints: CadCraft 309, BimCraft 520, MarkupCraft 83, TakeoffCraft 60, ModelCraft 162, CivilCraft 234, DetailCraft 121, PartCraft 297; every hint answers 200; 0 unused-preload warnings in MarkupCraft). Time NOT shown: with 70 ms added latency, alternating off/on runs, time to the drawing surface (median of three): at load 17 to 26 CadCraft 6,158 to 8,026 ms, MarkupCraft 3,246 to 3,315, PartCraft 6,773 to 5,873; at load 8 to 11 CadCraft 5,871 to 5,922, PartCraft 5,944 to about 6,500. No difference beyond the noise; the request count is the same. HTTP/1.1 keeps six connections whatever the hints say; PERF.1 (HTTP/2) is where this pays. (perf-start-10 2026-11-13: docs/0.10-sessions/perf-start-10.md; numbers docs/results/0.10/)

– Built · in the lab – Owner: flip PERF_PRELOAD=1 (or lab); gain not shown yet, measure again when the VPS is quiet
FixPERF.5 Link to PERF.5Comment on PERF.5 cc-dwg: writing an 8 MB drawing takes 5.4 s and 850 MB (Plans.dwg); reading 1.8 s. Target: write under 2 s

Measured 2026-11-08 (tools/perf/io-bench.mjs, Node 24): testfiles/powerline-plans/Plans.dwg, 8.2 MB, 288 objects, 50 blocks, 2 layouts: readDwg 1,834 ms; writeDwg 5,430 ms (9.0 MB out); 854 MB RSS. CPU profile of read + write: garbage collector 12 %, lz-r2004-write.js compressR2004 + best 16 % (hash-chain matcher, MAX_CHAIN 64, tokens as small arrays), writeDwg 5 %, nongraphic-write finish 3 %, buildModelParts 3 %, objects-write finish 3 %, BitWriter 3 %, bits-write bytes 4 %; the rest is spread thin. Plan: (1) compressor: flat Int32Array token store instead of [at,len,dist] arrays, skip the lazy second search when the first match is long, compare 4 bytes at once before the byte loop; (2) BitWriter: grow by doubling and write words, not bytes, where the profile shows bytes(); (3) measure allocation in objects-write/nongraphic-write finish (many small Uint8Array copies); (4) run bin/test-dwg* round trips after each step; the autosave (dwg-autosave.js writes a full DWG after edits stop) feels this directly on big drawings. Reading is already off the page thread (read-async.js); the writer is not: consider a worker for saves over 2 MB. Partly built (dwg-perf-10 2026-11-14, scale-11 2026-11-20): Plans.dwg write 2,400-2,600 ms to 1,240-1,410 ms and peak RSS 835 to 680 MB on workstation11a (idle), 4.1… Verified 2026-11-20 (0.11 close-out): tools/dwg-perf/bench.mjs --reps 5 on workstation11a (idle, load 0.29) with Plans.dwg (sha256 976345...5cf9, same file as testfiles/powerline-plans): write 1,239 / 1,291 / 1,209 / 1,157 / 1,229 ms, target under 2 s met (was 5,430 ms); read 857 ms; output 9,035,788 bytes (same as scale-11's identity runs); peak RSS 825 MB. tools/dwg-test/test.mjs 137 passed, 0 failed. writer-sync.mjs --check: all copies identical in cadcraft, bimcraft, civilcraft, modelcraft, partcraft, takeoffcraft (the reader fix is in every app). On the busy VPS (load 12.6, 8 cores) it takes 3.0-3.2 s; a compressor pool is not built and not what the title promises.

– Built · in the lab – –
Performance roadmap — wave 2 8
FixPERF.7 Link to PERF.7Comment on PERF.7 ModelCraft: importing a 10.7 MB glTF freezes the page for 8 s and peaks at 932 MB of JS heap

Measured 2026-11-08 in /use with tools/perf/open-file.mjs (Chromium, software GL): MetalRoughSpheres.glb (10.7 MB, glTF sample assets) through the Import input: open 8.5 s, 8.2 s of it main-thread long tasks (6 tasks, the longest 3.0 s: nothing on the page answers), JS heap 22 MB to 932 MB at the peak, 413 MB once settled. During zoom right after, frames p95 649 ms (software GL; a graphics card will do better, the main-thread stalls will not). Where: io.js / modelcraft.js parse and build the scene on the page thread. Plan: parse glTF/OBJ/STL/PLY in a worker (the DWG reader already has read-async.js as the pattern), transfer the typed arrays, build meshes in batches with a yield between, free the decoded copies (keep one copy of each buffer: the GPU upload, not the parsed JSON + arrays + three.js clones). Target: no long task over 200 ms, heap peak under 3x the file. Wave 3 (apps-3d.md): 500k faces import in 9.7 s with 9.1 s blocking and 992 MB of heap (about 2 KB per face); the 5 M-face GLB (114 MB) crashed the renderer tab; the first edit after a 400 MB import costs 36 s and 9 GB in Node because of the whole-model snapshot (PERF wave 3 rows). PARTLY BUILT in /lab 2026-11-14 (/lab, same machine, software GL): MetalRoughSpheres.glb 10.7 MB import 16.0 s to 6.3 s, blocking 12.4 s to 2.3 s, longest task 4.0 s to 0.71 s, JS heap peak 692 MB to 288 MB. m3d-500k glb: 10.7 s / 9.6 s blocking / longest 5.2 s / 990 MB to 5.7 s / 1.3 s / 0.54 s / 249 MB. BUILT 2026-11-21 (perf-finish-11), lane model, in /lab (a Discord member) only: glTF/OBJ read, weld and Mesh build in the worker pool (import-job.js), view geometry built in ~45 ms slices; ?import=page keeps the old path. workstation11a: 10.7 MB MetalRoughSpheres 332-334 -> 66-70 ms longest task, 500k-face glb 244-250 -> 0-58 ms, 500k obj 448-459 -> 78-84 ms, no task over 200 ms. 117-file identity 3,566 / 0, real page 28 / 0. Not met: heap under 3x the file (255 MB for 10.7 MB is the model itself); Draco glTF still imports on the page.

ModelCraft Built · in the lab – –
FixPERF.8 Link to PERF.8Comment on PERF.8 BimCraft: IFC geometry runs on the page thread — a 22.5 MB model blocks it for 4.3 s and peaks at 867 MB

Measured 2026-11-08 in /use (tools/perf/open-file.mjs): fixtures/showcase/bimcraft-water-treatment.ifc (22.5 MB, 115 elements, 683k triangles): the app says "Opened: 115 elements in 3.0 s", the page is quiet after 5.2 s, main-thread long tasks total 4.3 s (6 tasks, longest 1.66 s), JS heap 24 MB to 867 MB peak, 329 MB settled; zoom frames p95 500 ms on software GL. Where: lib/ifc/open-async.js moves only the STEP scan to a worker (about 0.4 s of this); ifc-model.js:107 then runs api.StreamAllMeshes on the page: profile placement, booleans, triangulation (cc-ifc geometry.js) for every element. Plan: run the geometry pass in the same worker (post meshes back as transferred Float32/Uint32 arrays per batch of elements, draw as they arrive, so the first walls show in under a second), or at least yield between elements; release the per-element intermediate data (the 867 to 329 MB drop is GC finding it). Node figures for the same file: geometry 1.3 s single-threaded, so most of the 4.3 s is the page's extra work (three.js meshes, materials, the model tree). Wave 3 (apps-3d.md): 115 MB blocks 13.9 s (longest task 5.5 s), 201 MB blocks 18.5 s (8.2 s), heap about 1 GB per 100 MB of IFC (201 MB → 1. PARTLY BUILT 2026-11-14 (bim-core-10). Built: the geometry pass is in slices of about 12 ms that give the page back (StreamAllMeshesAsync, lib/ifc), each element's meshes are dropped from the engine once copied (Geometry.sweep), batches grow typed BUILT 2026-11-21 (perf-finish-11), lane bim, in /lab (a Discord member) only: IFC geometry in a module Worker (lib/ifc/mesh-worker.js, mesh-stream.js) with progressive display in viewer3d.js; the page path stays as fallback, same model at 22.5/115/201 MB (batch digests equal). workstation11a first walls on screen 4.2 / 6.9 s -> 1.0-1.8 s (115 / 201 MB). Not changed: total blocking during an open (3.5-4.0 s at 115 MB): the long tasks left are other features at open (CO2e total 1.6 s, phases, view turn); the worker path holds ~0.5 GB more at 115 MB.

BimCraft Built · in the lab – –
FixPERF.9 Link to PERF.9Comment on PERF.9 CadCraft: opening an 8 MB DWG takes 4.1 s with one 1.3 s freeze when the worker hands the drawing back

Measured 2026-11-08 in /use (tools/perf/open-file.mjs): testfiles/powerline-plans/Plans.dwg (8.2 MB, 288 objects, 50 blocks, 2 layouts): quiet after 4.1 s; the reader runs in a worker (dwg/read-async.js, 1.8 s in Node) and then ONE long task of 1,258 ms on the page (cadcraft.js:2414 after readDwgAsync: building the drawing, blocks, display lists, first regen); heap 19 MB to 174 MB (peak 250 MB). Plan: build the entity records and the display lists in the worker (structured-clone cost vs transferable arrays: measure), or chunk the page-side build with a yield every 50 ms and paint what is there; keep the first regen under 200 ms. The autosave write (dwg-save.js, PERF.5) is the other half of the same drawing's cost. Partly built (dwg-perf-10 2026-11-14): Engine half: readDwgAsync now hands the drawing over as the model without its long lists plus packed, transferred slices (lib/dwg/model-pack.js). Headless Chromium, Plans.dwg, in a real module Worker: the page's longest task 562-692 ms (one structured clone) to none over 50 ms, timer gap 20-38 ms, same model (digest equal), 1.0 s less wall time. The page rebuilds all 188,231 entities in 85 ms in slices of 9 ms or less (Node). Log docs/0.10-sessions/dwg-perf-10.md. Partly built (cad-11 2026-11-20): other programs' 3D faces (Plans.dwg) are welded into the 3D model on first use or when the page is idle, not while the drawing opens (model3d BUILT 2026-11-21 (perf-finish-11), lane cad, in /lab (a Discord member) only: After the DWG worker, import, a Discord member.load, the first redraw cache, the drawing walk, reference bounds, the 3D split and the audit run in ~40 ms slices (slices.js), same drawing and pixels. Plans.dwg longest open task 3.3-5.6 s -> 124-255 ms (VPS); 1.3 M DWG opens in 28.8 s with no task over 200 ms (workstation11a). Import/load identical on 32 drawings; browser-perf-open 38 / 0, test-cadcraft 2,992 / 0. Left outside this row: Plans.dwg's 156,508 3D faces are welded in one 1.6-2.4 s idle task after the drawing shows (m3d).

CadCraft Built · in the lab – –
PlatformPERF.12 Link to PERF.12Comment on PERF.12 Website: /library front page runs 83 queries (250 ms) — N+1 loads and a 51 ms stats query per visit

Partly built (perf-site-10 2026-11-13). /library front page 237.6 ms and 77 queries to 129.4 ms and 10 (load 5 before, 23 after), HTML identical: the N+1 is gone (PERF.41) and the COUNT leaves out the version join (PERF.42). publicStats (43 ms) and AddonLibrary::all are not cached: aggregate SQL for publicStats measured slower (66 ms), only a stored row helps (docs/LIBRARY-1000X-DESIGN.md 3.6). Was: Measured 2026-11-08 (bin/admin-perf.php /library): 251 ms, 83 queries taking 130 ms: LibraryItems::browse x2 (55 ms: COUNT + LEFT JOIN + ORDER over 13,850 items), LibraryItems::publicStats 51 ms, AddonLibrary::all 9 ms, then Auth::byId x25, LibraryItems::byId x16, LibraryFiles::byId x15 for the cards. /library/browse and the category pages share browse(). Plan: batch the card lookups (one IN (...) per table), cache publicStats and AddonLibrary::all for 10 minutes (file cache in storage/, no APCu on this PHP), index the browse ORDER columns and make the LIKE search on 4 columns a FULLTEXT index; target under 60 ms and under 15 queries. library-11 2026-11-20: publicStats 48.13 ms to 0.05 ms warm (91.6 ms cold) and makers 0.26 to 0.02 ms behind .env LIBRARY_STATS_CACHE=1 (600 s on disk), output md5 identical (docs/results/0.11/library-11.md). Switch OFF: flip it and the front-page counts can be 10 minutes old; roll back by removing the line. LanguageNames::inUse is site-11's (Inbox).

– Built · in the lab – the owner flipping LIBRARY_STATS_CACHE; LanguageNames::inUse is site-11
PlatformPERF.16 Link to PERF.16Comment on PERF.16 Static delivery: no Brotli (gzip only), 7-day cache on files that are already cache-busted

Partly built (site-11 2026-11-20). Brotli is on for this site's static text types (css, javascript, json, svg, wasm) from public_html/.htaccess, gzip stays the fallback: app-workspace.js 32,458 B gzip to 30,611 B br, host.js 41,689 to 39,543, roadmap-issues.css 6,707 to 6,492; decoded bodies equal the files byte for byte (node zlib), identity and gzip answers unchanged; +3 ms per 140 KB file on a loaded box. The quality is server-level (BrotliCompressionQuality in .htaccess answered 500 and was removed within seconds), so the gain is 5 to 6 %; pre-compressed quality-11 siblings would give 15 % (27,671 B) at no CPU. Not done: the one-year immutable cache (some shared files import with a fixed ?v= number, so a year could pin an old file; and 0.10.1 is still moving), pre-compressed .br siblings (bin/release-app.php is the release session's). Was: Measured 2026-11-08: app files come back Content-Encoding: gzip only (cadcraft.js 198 KB to 61 KB); mod_brotli is loaded but not configured, and Brotli typically takes another 15 to 20 % off JS and CSS (1.4 to 1.7 MB of modules per app start). Every ?v= file carries Cache-Control: public, max-age=604800 (7 days); frozen release files and ?v=-busted shell files never change under their URL, so they can be immutable for a year (fewer revalidations on the second visit). Plan (.htaccess + Apache conf, no code): Brotli for text/css, javascript, wasm, json, svg with gzip as the fallback (or pre-compressed . BUILT 2026-11-21 (perf-finish-11), lane site, in /lab (a Discord member) only: Pre-compressed .br copies (quality 11, parallel tree assets/br, never inside a frozen folder) written by bin/brotli-siblings.mjs from bin/release-app.php; .htaccess serves them to browsers that accept br and gives live release folders a one-year immutable cache (current/, a Discord member/, /lab unchanged). CadCraft 0.10 over HTTPS: bin/test-static-delivery.mjs 15,307 / 0, every br/gzip/plain body equals its file; 14-17 % fewer bytes than gzip (cadcraft.js 54,806 -> 46,193). LIVE 2026-11-22 (owner's go): Brotli now wins for browsers that offer br, site-only (.htaccess: SetEnvIf Accept-Encoding br -> no-gzip, and the BROTLI_COMPRESS type list covers every type mod_deflate compresses); gzip-only clients unchanged; the server's deflate.conf and the other sites untouched. Checked over HTTPS: /roadmap, site.css, site.js, favicon.svg, robots.txt, sitemap.xml answer br to a browser and gzip to a gzip-only client, every br body decodes to the same bytes (sitemap.xml 501,803 -> 31,499 bytes); test-static-delivery 15,307 / 0; smoke 311 / 0. Pre-compressed .br copies (quality 11) for all eight apps' live 0.10: BimCraft 34.90 -> 9.64 MB, ModelCraft 17.26 -> 4.82, PartCraft 16.71 -> 4.77, CivilCraft 15.42 -> 3.59, DetailCraft 5.82 -> 1.59, TakeoffCraft 4.11 -> 1.05, MarkupCraft 1.98 -> 0.57 MB, 0 bad copies, test-static-delivery per app all 0 failed; live release folders answer br with a year, immutable.

– Built · in the lab – –
Sanity checkPERF.17 Link to PERF.17Comment on PERF.17 Frame rates on a graphics card: the VPS measures software GL only (BimCraft zoom p95 500 ms, ModelCraft 649 ms) — run the open-file tool on workstation11a

tools/perf/open-file.mjs runs Chromium with swiftshader on the VPS, so the zoom frame times it prints for the 683k-triangle IFC (p95 500 ms) and the 10.7 MB glTF (p95 649 ms) are the main thread's plus a software rasteriser, not what a person sees. Plan: run the same tool on workstation11a (tools/gpu-remote/run.sh; Chrome with the GPU) against /use, record p50/p95 frame times per app and file in docs/0.9-sessions/perf-09.md, and set the budget (p95 under 33 ms while orbiting a 1M-triangle model); only then decide on instancing, LOD or culling work in the shared renderer. PARTLY BUILT in /lab 2026-11-14, tools/scale-10/gpu-frames.mjs through tools/gpu-remote/run.sh on workstation11a (Windows Chrome, NVIDIA GeForce RTX 5070, D3D11): ModelCraft 500 k faces (90 draw calls, 504 k triangles) orbit p50 10 ms (100 frames a second, the display rate), p95 10 ms; 5 M faces (5.0 M triangles) orbit p50 10 / p95 10 ms, one 2.1 s frame while the model settled, zoom p95 50 ms; CadCraft 12 MB DXF (100 k objects) p50 10 ms, p95 60 ms; BimCraft 22 MB IFC p50 10 ms. On the VPS (software GL) the same views took 0.4 to 1 s a frame. The card is not the limit at these sizes; the display rate caps what is shown. PARTLY BUILT 2026-11-20, scale-11, tools/scale-11/gpu-frames.mjs --heavy on workstation11a (RTX 5070, Windows Chrome, D3D11, 100 Hz display): CadCraft at 100 k entities and Plans.dwg (188 k) 100 frames a second; CadCraft with a 1 M-entity DXF (122 MB, opens in 35 s) pans at p50 700 ms (1.4 fps), zoom p50 10 ms but p95 140; a 1.3 M-entity DWG (opens in 38 s) pans at p50 670 ms: past about 200 k entitie BUILT 2026-11-21 (perf-finish-11), lane cad, in /lab (a Discord member) only: CadCraft at 1 M objects: while panning a drawing slower than 50 ms a frame the last full picture is moved, full redraw 160 ms after you stop. RTX 5070 (workstation11a) a Discord member p50 690 -> 10 ms (1 M DXF), 650 -> 10 ms (1.3 M DWG), pixel-equal to a full redraw. A full redraw after an edit is still ~710 ms (PERF.28, planned).

– Built · in the lab – Device runs only: the frame rate inside Studio (needs a Studio build) and on a second card / another machine
PlatformPERF.18 Link to PERF.18Comment on PERF.18 CadCraft Studio start-up time: a startup log with timestamps in the desktop shell, measured on Windows and macOS

Not measurable on the VPS (Studio is a Windows/macOS/Linux desktop shell around the web apps; the page part is PERF.1 to PERF.4). KICKOFF line 196 already asks for a startup log a person can send. Plan: desktop-shell logs timestamps for process start, single-instance lock, window shown, first page request, app module running, first drawing paint; the About dialog shows the last start's total; owner measures a cold and a warm start on the Windows workstation and the Mac mini with the 0.9 build and records them in the release notes. Budget: window in under 1 s, app usable in under 3 s warm. studio-10 2026-11-14: Written in desktop-shell (source only): startup.log gains the first page request, a line per app window and the two stages only the page knows; cadcraftDesktop.startLog.summary() answers the stages in milliseconds and whether the window came in under 1 s and the app was usable under 3 s; startLog.text(previous) gives the words for Copy / Save. No file names, paths or account data (every stage is a literal or a window label). std-only tests (2, rustc --test) and the source contracts pass. No start was timed: the numbers are the owner's on real machines. studio-11 2026-11-20: Studio's hub (studio/hub/hub.js) now tells the shell 'app module running' and 'first drawing paint' at its own start, and Settings > Updates shows the last start (ready in N s, window in N s, within the aim or not) with Copy and Save the start-up log. Hub tests 119/0, a headless hub run with a stand-in shell saw both marks and the row. Not timed on a real machine. LANDED 2026-11-20 (inbox-11) the page side: app-shell.js marks 'app module running' and 'first drawing… Verified 2026-11-20 (0.11 close-out): Hub test (studio/test/test-hub.mjs) 122/0 today, startlog.rs rustc --test 2/0, desktop-shell bridge test 137/0; one real Windows start already seen (window 762 ms, first paint 1021 ms). Cold/warm series and the Mac are a person's timings on real machines. The hand check is PERF.18-HAND.

– Built · in the lab – –
PlatformPERF.15 Link to PERF.15Comment on PERF.15 "Save for offline" downloads 107 to 260 MB per app; 103 MB of CadCraft's 173 MB is compiled help in 52 languages

Measured 2026-11-08 (bin/offline-size.php --libs): CadCraft 0.8.2 offline set 173 MB in 2,077 files: app files 161 MB, libraries 9.6 MB (pdfjs 5.2, three 2.1), shell 2.7 MB. Of the app files, help/ is 103 MB (52 compiled help.<locale>.js of 2 to 3 MB each plus 395 .md sources) and lang/ 33 MB (55 locale files); the modules a person runs are 3.7 MB at the top level. BimCraft 0.8.1 is similar; a Discord member builds reach 260 MB; MarkupCraft 78 MB carries 11.9 MB of Tesseract OCR data. On a phone this is a long download for one language. Plan: the offline set keeps the chosen locale (its lang file and its help.<locale>.js) plus English, never all 52; help .md sources are not saved (the compiled help is what the panel reads); OCR language data per picked language; optional "all languages" switch for a shared classroom machine. AppBuilds::offlineFiles takes the locale (PERF.3 fetches the list on demand). Expected: CadCraft about 35 MB instead of 173 MB, with the same offline behaviour for that person. Test: bin/offline-size.php gains --locale and the service-worker test checks the saved copy opens the help in the picked language. Built with PERF.3 behind PERF_OFFLINE_LAZY (off): the saved copy keeps the page's language chain (es-MX, es, en) of the compiled help and the language files only. /use copy size: CadCraft 265.3 to 32.6 MB, PartCraft 226.9 to 19.3 MB, MarkupCraft 110.2 to 24.7 MB (English). Changing language offline means saving again (the saved page is server-rendered in its language anyway). Not built: PERF.60 (the help index split) and help per language on demand when a person changes language. (perf-start-10 2026-11-13: docs/0.10-sessions/perf-start-10.md; numbers docs/results/0.10/)

– Built · in the lab – Owner: flip PERF_OFFLINE_LAZY=1 (or lab) in .env
Performance roadmap — wave 3 49
Sanity checkPERF.19 Link to PERF.19Comment on PERF.19 Scale: time is linear, memory is the ceiling. The 10x/100x/1000x table and where each format stops

The wave 3 scale track ran every engine on 10x and where possible 100x and 1000x files (Node 24, 12 GB heap cap; docs/0.9-sessions/perf-wave3/scale-1000x.md, tool tools/perf/scale-bench.mjs, generators tools/perf/gen/, 7.6 GB of files registered in testfiles/LARGE-FILES.md). Read time scales linearly almost everywhere (exponents: DWG read 0.93, IFC open 0.95, glTF 0.9, LandXML 1.1, LAS 0.7, GDS 0.87, PDF 1.0); the DWG writer is super-linear (1.3). What stops a file is memory and the data shape: one JS string per text file (hard stop 512 MB, practical 100 MB), one object per entity (cc-dwg 35 bytes of heap per file byte), whole-document JSON per undo step. Passes today: point clouds to 2 GB (100 M points in 59.5 s, 3.8 GB), cc-ifc index to 1.9 GB (15.9 s), GDS/OASIS to 622 MB (2.4 s), pdf.js 2,000 sheets (0.6 s), glTF 400 MB import (17 s). Stops: DXF 15 MB (crash, FX.142, now fixed), cc-dwg 76 MB needs 2.6 GB and 66 s to write, LandXML 358 MB needs 4.9 GB, ModelCraft first edit after a 400 MB import 36 s and 9 GB. This row: put the 1x and 10x lines of scale-bench into the PERF.6 budget (one line per format, fail on +15 % or any task over 5 s), plus the in-app budgets the 2D and 3D tracks set with their scripts (tools/perf/apps2d-*.mjs, apps3d-*.mjs on the registered files): CadCraft 100k entities open under 3 s, redraw p95 under 33 ms, pick under 5 ms, autosave under 500 ms; CivilCraft 500k points open under 5 s, zoom p95 under 100 ms; MarkupCraft 2,000 sheets switch p95 under 150 ms, heap under 400 MB; BimCraft heap per MB of IFC, ModelCraft heap per face, DetailCraft per member, draw calls, edit to next frame. Keep the table in the release notes results section; each format and app row below is the work. BUILT 2026-11-20 (scale-11, ws11a; docs/results/0.11/scale-11-table-ws11a.txt): IFC 201 MB open 0.7 s; 1.9 GB 6.3 s, peak 19.5 GB; DWG 100x (13 M entities) read 91.5 s, write 289 s, peak 43 GB. The run found DWG reads losing objects past 256 MiB; fixed.

– Our engines Built · in the lab 2 – docs/0.9-sessions/perf-wave3/
FixPERF.20 Link to PERF.20Comment on PERF.20 Scale: every text format reader holds the whole file as one JS string (DXF, LandXML, OBJ, DAE, ASCII STL, USDA, the native JSON documents)

Measured: a 1 GB DXF and a 692 MB LandXML die in TextDecoder.decode ("Cannot create a string longer than 0x1fffffe8"); a 358 MB LandXML needs 4.9 GB and 27 s; a 10 MB DXF needs 364 MB (38 bytes of heap per file byte, parsed twice through dxf-model.js:65). Sites: dxf-decode.js:35-49 and dxf.js:68-74, civilcraft.js:2485 and xml.js:27, modelcraft io/obj.js:84, and JSON.parse(await file.text()) for every .modelcraft/.detailcraft/.civilcraft document (modelcraft.js:3210). The caps that exist (CivilCraft 200 MB, ModelCraft 200 MB, OBJ 64 MB) are honest and stay until the readers stream. Change: byte-level tokenizers over Uint8Array fed from Blob.slice with lazily decoded values and Float64Array/Uint32Array output, the way lib/ifc scanStep already works. DXF first (the reader is 1,563 lines, L), then LandXML (M), OBJ and ASCII STL (S each). Target: 100 MB DXF under 1 GB of memory, 1 GB files open with a progress bar instead of an error. PARTLY BUILT in /lab 2026-11-14 and 2026-11-20: one shared parts reader (lib/textin); DXF, LandXML + XML parser, OBJ, ASCII STL, Collada, USD text and project JSON read from parts, byte-identical to the old readers; ws11a: a 954 MB DXF opens in 42 s, a 691 MB LandXML in 16 s (both failed at the 512 MB string limit); the tree of objects is the ceiling (LandXML 13x its size, DXF 16 to 20x). 0.11 (scale-11): CSV points (lib/layout, civilcraft patch), G-code (lib/carve) and GeoJSON (patch) read from parts: 18 M points 27.6 s, 36 M G-code lines 28.8 s, a 1 GB GeoJSON 16.7 s (all refused over 512 MB before); the Set that stopped both point readers at 16,777,216 points is gone; same speed under 512 MB; GeoJSON parts are 2.3x slower than one string, so parts only over about 400 MB. A 197 MB DetailCraft model rea LANDED 2026-11-20 (inbox-11b) scale-11 patch applied to civilcraft/a Discord member (points.js, geojson.js, landxml.js; chunks.js synced); DetailCraft openFile cap 50 to 400 MB. test-readers 488/0, test-writers 22/0, test-civilcraft 417/0. (inbox-11b) BUILT 2026-11-21 (perf-finish-11), lane scale-shell, in /lab (a Discord member) only: lib/textin joins parts under 400 M characters and hands them to JSON.parse, so callers pass parts at any size; the PartCraft and DetailCraft caps are 400 MB. workstation11a, same value: 268 MB GeoJSON from parts 4.5-5.2 s -> 1.9-2.0 s, peak 3.6 -> 2.2 GB; 197 MB DetailCraft project 1.5-1.7 s -> 0.95 s; a 1 GB GeoJSON unchanged by design (past the join limit). textin 70 / 0, test-readers 488 / 0; textin / textout / history copies in step in every app (--check clean). Not met: a 100 MB DXF under 1 GB (the object tree is 16-20x the file, not the reader).

CadCraftModelCraftCivilCraft App codeOur engines Built · in the lab 12 – docs/0.9-sessions/perf-wave3/
FixPERF.21 Link to PERF.21Comment on PERF.21 Scale: ModelCraft, DetailCraft, PartCraft and CivilCraft snapshot the whole document as JSON on every undo step and autosave

Measured: a 400 MB glTF (5 M faces) imports into ModelCraft in 17 s and 2.5 GB, then the FIRST edit calls model.js:2408 snap() (also :2223, :2230, :2272, :2331): 407 MB of JSON, 35.6 s, 9 GB peak, so the tab dies after a successful import. At 500k faces the snapshot is 3.1 s per edit. Same shape in DetailCraft model.js:169-199 (stringify before AND after every change), PartCraft part.js:504-517 and CivilCraft project.js:155. Change: command or diff undo (or per-definition dirty snapshots), meshes kept as typed buffers instead of base64 inside JSON, autosave payloads as Blobs of those buffers (the shell's IndexedDB store already takes Blobs). ModelCraft first. Extends PERF.7 with the 10x and 100x numbers. Built in /lab 2026-11-15 (session history-10; lib/history, one thin adapter per app). Undo by change records: a step holds the chunks one edit changed. DetailCraft grid48x30x10 (20,000 members): undo 62 to 6 ms, 20 steps hold 133 MB before and 0.2 MB now, an edit step 49 to 8.6 ms. CivilCraft survey-500k + 20,000 features: undo 32 to 15 ms, 56.6 MB to 1.1 MB. PartCraft features-750: 3.8 MB to 0.1 MB. ModelCraft was already by deltas (MD.1): at 5 M faces an edit and an undo take 0.1 ms and 0.3 MB; the 36 s / 9 GB figure of the wave-3 report is not the a Discord member build. Tested: 878 + 15 library checks, a Discord member a BUILT 2026-11-21 (perf-finish-11), lane civil, model, scale-shell, in /lab (a Discord member) only: CivilCraft: hot edit callers (grips, profile points, 35 Properties edits, feature replace/delete, point moves) name their chunks; lib/history keeps its id index between hinted calls. 500k points + 20,000 features: grip drags 62-87 -> 0.14-0.20 ms, feature after an undo 66 -> 6 ms, delete 110 -> 32 ms, same records (809 / 0 with every hint checked against the full look, 6 / 0 real page). ModelCraft: 400 MB glTF on quiet workstation11a graft 1 ms, first mesh edit 0 ms, undo 1 ms (wave 3: 36 s / 9 GB); the first autosave copy of such a model is still 12.6 s / 6.6 GB peak, in the worker.

ModelCraftCivilCraftDetailCraftPartCraft App code Built · in the lab 10 – docs/0.9-sessions/perf-wave3/
FixPERF.22 Link to PERF.22Comment on PERF.22 Scale: cc-dwg keeps 35 bytes of heap per file byte, clones the drawing out of the worker, and the writer is super-linear (extends PERF.5, PERF.9, PERF.10)

Measured at 10x (a 76 MB R2004 drawing, 1.4 M entities): readDwg 19.9 s and 2.6 GB after read (one object per entity and per vertex, objects-read.js:608-613 and :1105), the worker reply structuredClone adds 1.06 GB and 14.6 s (read-async.js:67), writeDwg 66 s (33 s from a fresh model), exponent 1.3. A 760 MB drawing would need about 27 GB: it does not fit anywhere. Browser ceiling today about 55 to 110 MB. Change: a struct-of-arrays entity store with lazy per-entity decode from the object map (the map and section locators are small; readDwg(bytes) at read.js:30 becomes openDwg(blob) with byte-range decoding), the worker reply as transferable typed buffers (or decode on the page from the transferred bytes), and a writer that streams sections to a FileSystemWritableFileStream. Reader L, writer M. The four apps carry byte copies of lib/dwg. Partly built (dwg-perf-10 2026-11-14): Writer half and worker hand-off built (see PERF.5, PERF.9): the worker copy is no longer cloned. Reader heap measured at 16.1 B per file byte (heapUsed after a GC, Plans.dwg and the 130k and 1.3 M generated drawings alike; the row's 35 was not reproduced), 15.6 now: one string per owner saves 0.5, the rest is 1.14 M objects and 2.5 M boxed numbers the model shape needs. Log docs/0.10-sessions/dwg-perf-10.md. PARTLY BUILT 2026-11-20, scale-11: measured on a prototype outside the apps (tools/scale-11/proto-table.mjs, lib/dwg/model-pack.js as the table): the reader holds 15.2 to 15.6 B of heap per file byte (not 35); keeping the entity lists as typed arrays: Plans.dwg 128 MB to 49 MB (2.6x), 1.3 M entities 1,150 MB to 346 MB (3.3x), all lists back as objects in 0.43 s per 1.3 M; the proposal (shape, each app's adapter, risk) is in the log under For the owner. A bug that read objects past 256 MiB as empty was fixed in the reader. No model changed.

CadCraftBimCraftModelCraftCivilCraft Our engines Built · in the lab 12 The owner's yes on the typed-array entity table (docs/0.11-sessions/scale-11.md, For the owner) docs/0.9-sessions/perf-wave3/
FixPERF.23 Link to PERF.23Comment on PERF.23 Scale: cc-ifc copies the file for the worker and keeps every mesh in memory; save is O(lines) (extends PERF.8, PERF.10)

Measured: the index scans 1.9 GB in 15.9 s and 3.3 GB in Node (linear, typed arrays, lazy per-line parse: the healthy template for the other readers). But open-async.js:33 data.slice() doubles the bytes on the page (ceiling about 1 GB in a tab), open plus geometry plus save holds 12.8 times the file (2.57 GB at 200 MB; in the browser the heap grows about 1 GB per 100 MB of IFC: 210 MB peaked at 1.99 GB, 1 GB would need 10 GB), and save() walks every line with three chunks each (model.js:232-256, 8.8 s at 115 MB). Change: transfer the caller's buffer or let the worker read from the Blob; stream meshes to GPU buffers with an LRU instead of keeping all triangles in JS; save by coalesced byte ranges into a writable stream. Pairs with the BimCraft geometry-off-the-page-thread row (PERF.8). PARTLY BUILT 2026-11-14 (bim-core-10). Built: no copy of the file for the worker when the page just read it (openIfcAsync transfer: true, opening a file from disk), meshes of an element no longer kept in the engine after the viewer copied them, typed batch arrays. Not built: streaming meshes to GPU buffers with an LRU, and the save by byte ranges into a writable stream (save still walks every line). No 115 / 201 MB numbers yet. BUILT 2026-11-21 (perf-finish-11), lane bim, in /lab (a Discord member) only: IfcFile.saveParts / saveTo save by coalesced byte ranges, byte-identical (160 / 0, 108 / 0 on workstation11a); save 115 MB 1,295 -> 87 ms, 201 MB 1,761 -> 232 ms. Streaming meshes to GPU buffers with an LRU (in the description, not the waits) is not built.

BimCraftDetailCraft Our engines Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
FixPERF.24 Link to PERF.24Comment on PERF.24 Scale: autosave rewrites the whole document every couple of seconds of editing, in every app (extends PERF.5)

Measured and read: CadCraft autosave writes a full DWG (dwg-autosave.js:39 saveDwg; 4.8 s today, 66 s at 10x), BimCraft the full IFC bytes (bimcraft.js:585 to model.js save), MarkupCraft the whole PDF Blob (markupcraft.js:4715; TakeoffCraft stops at 64 MB, takeoffcraft.js:4313), ModelCraft the JSON (modelcraft.js:3883). On a big file autosave is the longest task the person sees while working. Change: journal autosave, keeping the opened file's bytes or handle plus the edits map (IfcFile already holds exactly that in memory), snapshots taken in a worker from transferred buffers, and a clear cap with a message above a size. Shared piece in the shell's app-autosave.js, one snapshot function per app. Built in /lab 2026-11-15 (session history-10). The shell's autosave has a journal mode: the first copy is the whole document, then only what changed; a failed write loses nothing, a crash between writes leaves the… history-11 2026-11-20: CadCraft and BimCraft built in /lab. CadCraft (dwg-journal.js): the copy is the DWG once, then the objects, blocks, layers and settings that the a Discord member's own undo ops touched, in order, named by their file keys; anything it cannot follow (3D model, layouts list, draw order, a block editor, a version bump with no step) writes a new base. 100,000 objects: next autosave after one edit 9,663,404 bytes / 6,606 ms to 169 bytes / 1 ms. BimCraft (history/ifc-journal.js): the copy is the opened IFC bytes plus the edit map, t BUILT 2026-11-21 (perf-finish-11), lane scale-shell, model, bim, in /lab (a Discord member) only: MarkupCraft: real /lab page with a 10.3 MB 200-sheet PDF, renderer killed mid-edit: base once, then +1,100 bytes a copy, Recover reopens the edit (5 / 5). ModelCraft: an edited mesh is written as its edits (one edit 5.9-24 MB -> 2,048 bytes; 400 MB glTF 305 MB -> 2,200 bytes; recovers 122 / 0). BimCraft: models with pictures use the journal, pictures as files only when they change (next copy 9,718 -> 130 bytes; big pictures now recover; 88 / 0).

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App shellApp code Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
FixPERF.25 Link to PERF.25Comment on PERF.25 Scale: point clouds pass 2 GB, but the octree merge is single-threaded, LAZ copies the whole file into WASM and E57 is one 512 MB buffer (extends PERF.10)

Large point clouds: tiled by a worker pool, LAZ read chunk by chunk, E57 page by page, every point kept. 0.10 (pointcloud-10): tile pass on up to 4 workers, byte-identical to the serial build; LAZ chunk reader (heap 3 MB, not the file); E57 page reader. pointcloud-11 2026-11-20: a LAZ of 2.10 GiB and 241,100,000 points (made once, registered in testfiles/LARGE-FILES.md, made-up terrain) builds in 268.5 s with one decode thread and no tile workers, 207.3 s with 8 tile workers, 94.9 s with 4 LAZ decode threads (each its own laz-perf, results in file order: byte-identical cloud, tested), the merge of the upper nodes in the worker pool and the build folder cleaned 32 files at a time (2.54 M points a second, peak RSS 6.1 GB, workstation11a). The old whole-file reader cannot read that file ("not enough memory"). An E57 of 600 MB (22.1 M points) builds in 18.8 s, every point kept, 0.95 GB. Not done: a browser tab with a 2 GB file; the files are made-up data and the E57 writer was never opened in another program. Results: docs/results/0.11/pointcloud-11-perf25.md.

CadCraftBimCraftCivilCraft Our engines Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
PlatformPERF.26 Link to PERF.26Comment on PERF.26 Scale: text writers return one string, so exports stop at 512 MB and hold twice the output

DXF (dxf.js:1324, dxf2000.js:437), LandXML (landxml.js:227), OBJ, DAE, USDA (usda-write.js:33), GeoJSON and gcode writers each build one string and return it; a 1,000,000-entity DXF export is near the V8 string limit and the string plus its Blob is twice the output in memory. Change: writers that yield chunks into a WritableStream (createWritable on a file handle when the host offers one, else a Blob built from parts), with the same report object. Pairs with the streaming readers row. Partly built (dwg-perf-10 2026-11-14): lib/textout/chunks.js (TextChunks: parts, Blob, pipe, string only while it fits): equal to lines.join at every size around a part, and 686 MB of text written without a string (peak RSS 1.7 GB). A ready patch for the DXF writer is docs/0.10-sessions/dwg-perf-10-dxf-chunks.patch. Log docs/0.10-sessions/dwg-perf-10.md. PARTLY BUILT 2026-11-20, scale-11: TextChunks gained push(); the LandXML and GeoJSON writers (patch for civilcraft/a Discord member) and the G-code writer (lib/carve, done) write past 512 MB: LandXML 9 M points 706 MB in 11.6 s, peak 3.2 GB (the string version fails: Invalid string length); 6 M points peak 5.7 GB to 2.2 GB; GeoJSON 4.8 M features 661 MB (fails as one string); G-code 40 M moves 767 MB (fails as one string). Same text as before on 62 checks. The DXF patch of 0.10 still applies: posted to cad-11. docs/results/0.11/scale-11-text-ws11a.txt. LANDED 2026-11-20 (inbox-11b) LandXML and GeoJSON chunked writers in civilcraft BUILT 2026-11-21 (perf-finish-11), lane scale-shell, cad, civil, model, in /lab (a Discord member) only: lib/textout TextChunks.output() (a string to 300 M characters, a Blob past that). CadCraft DXF 2000 save at 1 M objects works (was "Invalid string length": 538 M characters in parts, 12.5 s); CivilCraft LandXML and GeoJSON export in chunks (Blob past 300 MB), GeoJSON import from parts; ModelCraft OBJ, Collada, USDA write in parts, byte-identical 33 / 0; carve G-code check 29.8 -> 0.45 s (261 / 0). Copies synced (--check clean).

CadCraftModelCraftCivilCraft App codeOur engines Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
FixPERF.27 Link to PERF.27Comment on PERF.27 Scale: MarkupCraft reads the whole PDF twice and keeps the whole PDF per autosave; OBJ import refuses at 64 MB where the same model as GLB imports fine

Two small ones from the scale track. (1) pdf.js is healthy (2,000 sheets open in 0.6 s, lazy), but markupcraft.js:1158 and :1206 read the file twice, the second time only to count pages; and the autosave stores the whole PDF Blob each time: count pages from the first open, keep a file handle or the original bytes once. (2) ModelCraft io/obj.js:32 refuses OBJ above 64 MB (about 1.7 M faces) with an honest message while the same model as a 400 MB GLB imports in 17 s; lift the cap with the byte scanner and typed arrays from the streaming readers row. closing 2026-11-16: Planned → Partly built. history-10 built the autosave half (each PDF written once); the double read when counting pages is not touched. BUILT 2026-11-20 (sheets-11). The picture-from-PDF path counted pages with one read of the file and drew the page with a second: the document that counted the pages now stays open and is handed to the drawing (a cancelled question destroys it). Same file, same script (tools/sheets-11/perf27.mjs, real /lab page): plan-set-200.pdf (10.3 MB) one insert, before 2 reads / 20,655,330 bytes, 1,642 / 1,035 / 1,363 ms; after 1 read / 10,327,665 bytes, 1,013 / 598 / 569 ms (VPS load 22 to 39: timings indicative, read counts exact). The autosave half was history-10's. docs/results/0.11/sheets-11-perf27.txt. In /lab (a Discord member) only, not released. English only; not hand-tried by a person.

ModelCraftMarkupCraftTakeoffCraft App code Built · in the lab 2 – docs/0.9-sessions/perf-wave3/
FixPERF.30 Link to PERF.30Comment on PERF.30 CadCraft: the Problems audit stringifies every entity after every change; DXF parses on the main thread; save ceilings at 1M entities

problems-cadcraft.js:45/52 shapeKey and auditIds cost 450 ms per edit at 100k entities (a JSON key per entity after each change): make the audit incremental over the touched ids. readDxf runs on the main thread (1.9 s at 100k; the DWG reader already has a worker, dwg/read-async.js): move the DXF reader into the same worker or stream it (the scale readers row). Save ceilings: writeDxf2000 dies at 1M entities with "Invalid string length", saveDwg takes 58 s and 4.2 GB of heap at 1M (over Chromium's default) and 6.1 s / 1.4 GB at 100k: chunked Blob output (the writers row) and the DWG writer in a worker (the autosave row, which measured the autosave write at 0.5 s for 10k and 5.8 s for 100k on the main thread). closing 2026-11-16: Planned → Partly built. The Problems audit part is built (905 → 138 ms at 100k entities, docs/results/0.10/cad-10-audit.json); DXF in a worker and the save ceilings are not done. Measured (cad-11 2026-11-20, before): entities-100k.dxf opens in 2.8 s with one 2.7 s task on the page (read 1.13 s, load 0.24 s, cache 0.81 s; docs/results/0.11/cad-11-open.jsonl). Nothing changed yet. BUILT 2026-11-21 (perf-finish-11), lane cad, scale-shell, in /lab (a Discord member) only: DXF read in a worker (100k open task 2.7 s -> 88-118 ms); DXF 2000 save writes in parts (1 M objects, was "Invalid string length"); DWG save built in slices and written in a worker, same bytes 108 / 108; lib/dwg writeDwg peak +2,468 -> +1,101 MB over the model at 1 M (27 s -> 15 s, corpus 564 / 564 identical); a DWG of 2 MB or more is read and imported inside the worker, block-record lookup no longer quadratic; a stopped writer fails the save with a reason. workstation11a, /lab page, Save as DWG 2018 then reopen in a fresh page: 1 M DXF 16.1 s, CadCraft's own 1 M DWG 17.3 s, 1.3 M DWG 11.9 s, longest page task 128-176 ms, every reopen gives back the same object count (1,000,000 / 1,000,000 / 1,300,000). browser-perf-open 70 / 0, test-cadcraft 2,992 / 0. Older: Plans.dwg loses 15 of 16,631 objects on a save-and-reopen with the old page save too (not from this row).

CadCraft App code Built · in the lab 3 – docs/0.9-sessions/perf-wave3/
FixPERF.33 Link to PERF.33Comment on 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

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). PARTLY BUILT in /lab 2026-11-14: open of the 500k project 37.1 s to 5.0-6.4 s; the pair check no longer parses the project (sniff in pieces), so it is parsed once; integer vertex keys. Not built: Worker, streaming LandXML, progress. PARTLY BUILT in /lab 2026-11-20 (civil-11): a project of 20,000 points or more triangulates its surface in a module Worker (points go as typed arrays, the surface comes back by transfer and is put into p.eg()'s memo): no long task on the page while it runs (real page, 40,000 BUILT 2026-11-21 (perf-finish-11), lane civil, in /lab (a Discord member) only: One Worker reads and parses the project, builds line-code figures, the surface (points or TIN), stats, outline and first-scene contours; streaming LandXML TIN reader landxml-lists.js; each closed contour drawn as its own path (identical pixels). 500k project (23 MB) longest task 2.0-2.5 s -> 0.38-0.55 s, 500k LandXML TIN (69 MB) 30-40 s -> 0.88 s; 110 Node checks equal to the page build, 13 / 0 in the real page; test-civilcraft 417 / 0. Not done: LandXML survey points still use the old reader.

CivilCraft App code Built · in the lab 4 Owner: keep the 2,000,000-point cap, or ask for typed-array points with point undo by change (each point-edit undo step copies the array today) docs/0.9-sessions/perf-wave3/
FixPERF.36 Link to PERF.36Comment on PERF.36 DetailCraft: every edit recomputes everything: autopilot, a quadratic clash check, a full scene of 1,925 draw calls, two JSON snapshots, linear model scans

Measured in /use 0.8.1 and in Node (tools/perf/apps3d-detailcraft.mjs, apps3d-detail-node.mjs; 2,820-member grid24x12x5 and the new 10x grid48x30x10 with 28,500 members and 100x grid60x60x40 with 285,600 members): refresh() (detailcraft.js:354) after any change runs build 151 ms, markParts 261 ms, autopilot.propose 899 ms (18 times more for 6.2 times the members), clashCheck 10.2 s (quadratic), and rebuilds the whole three.js scene with a Mesh plus an EdgesGeometry per part (1,925 draw calls for 948 parts); Model.change stringifies the state twice (model.js:165/170; 20 MB at 10x, 197 MB at 100x) and undo re-parses all of it; Tx.addHole and addConnection find by find/some (model.js:349, :376), so pasting the 10x model took 2.6 s and building the 100x file 716 s. Change: incremental build by id, patch-based undo (the whole-document snapshot row), an instanced or merged scene, id maps in the model API, clash check through a g PARTLY BUILT 2026-11-15 (detail-10). Built: the quadratic clash check by a grid (2,820 members: 10,798 ms -> PARTLY BUILT 2026-11-20 (detail-11). Built: build(state,{cache,dirty}) keeps connection results, member parts, plate parts and footing bars by version, the model's dirtySince() names the changed chunks; markParts keeps each part's form; Tx lookups by id and hinted addHole/addCut (undo was already patch-based, lib/history). Same answer as 0.10 (test-perf-11.mjs, whole JSON, 33 checks). workstation11a, 28,500 members (uncapped), median of 5 edits, 0.10 -> lab: change+build+marks 1,180 -> 738 ms (marks 794 -> 341 ms, build 382 -> 392 ms: unchanged); 2,000 addHole 143 -> 12 ms; 2,000 addConnection 234 -> 12 ms; clash 8.4 s -> 8.9 s (still the biggest cost). NOT built: build()'s remaining O(n) passes (about 390 ms at 28,500), the clash check's cost at 28,500, the scene per changed part, a real-GPU run. readModel keeps 20,000 members: a 28,500 file opens as 20,000 (product limit, owner). In /lab (a Discord member) only, not released; not tried by a person. BUILT 2026-11-21 (perf-finish-11), lane detail, in /lab (a Discord member) only: Clash check groups parts by connection once (was 29,640 x 58,140 scans), number-keyed grid, sample points once per part; build keys parts by the connection results that drilled them and stops copying holes; the 3D scene updates only the replaced parts (updateParts, whole rebuild as fallback) and shares geometry between parts of the same shape. workstation11a, 28,500 members: clash check 7,261 -> 309 ms (no clashes), 9,523 -> 4,088 ms (3,027 clashes), identical to 0.10 at 0/1/5 mm and with a phase filter; one edit 1,112 -> 506 ms (build 352 -> 191); RTX 5070, 20,000 members: edit to next frame 573 -> 401 ms, scene and picture identical to a rebuild (16 / 0); test-detailcraft 13,111 / 0. Left: build is still one pass per edit (~190 ms); constructability ~400 ms per edit is outside this row; the app opens at most 20,000 members.

DetailCraft App code Built · in the lab 6 – docs/0.9-sessions/perf-wave3/
FixPERF.37 Link to PERF.37Comment on PERF.37 BimCraft: the first click builds the inverse index on the page thread (5 to 12 s), picking raycasts every triangle, a section plane rebuilds all caps

Measured in /use 0.8.1 on 22.5 / 115 / 201 MB IFC (tools/perf/apps3d-bimcraft.mjs): the first property lookup calls ifc/model.js:173 inverse() (api.js:347-421) over the whole file: one 5.1 s task at 115 MB, 7.7 s plus properties = 12.1 s blocked at 201 MB. hitAt (viewer3d.js:833) has no bounding-volume tree although three-mesh-bvh is vendored: 47 to 133 ms per raycast at 683k triangles, 180 to 508 ms at 2.26 M, on every hover. setSection rebuilds every batch's stencil caps (updateCaps viewer3d.js:504): 1.4 s, 3.9 s, 8.0 s. Change: build the inverse index in the scan worker (open-async.js) or in idle slices after open; computeBoundsTree per batch; cache per-batch cap geometry and cull batches by the plane. Open itself: blocking 9.0, 13.9, 18.5 s with longest tasks 3.0, 5.5, 8.2 s (StreamAllMeshes api.js:312 in one synchronous loop, appendGeometry ifc-model.js:238 into JS arrays, runEdges ifc-vis.js:111 at 1.1 s per million triangles, the property index put at open): that is PERF.8, now with 10x numbers. Healthy: batching (46 to 104 draw calls), render CPU 2 to 7 ms, the tree panel (19k nodes, setTree 12 ms), idle after open. PARTLY BUILT 2026-11-14 (bim-core-10). Built: the property indexes (property sets, type, classification, groups, spatial) are built in slices 1.2 s after the open (IfcFile.inverseAsync, IfcAPI.PrepareInverses), so the first click does not pay for them; a bounding-volume tree (three-mesh-bvh, indirect) per batch built between frames makes picking walk a tree: the same 80 rays on the 22.5 MB model gave th BUILT 2026-11-21 (perf-finish-11), lane bim, in /lab (a Discord member) only: The Assets panel no longer reads every element's properties on the first click while closed; pick snapshot cached; LOD list and snapshot built in idle time after an open. workstation11a first click 1.6 -> 0.8 s (115 MB), 3.1 -> 1.5 s (201 MB); section set 0.38-0.59 s, moved 43-69 ms. The rest of the first click is extensions' own pick code and the report-as / classification panels.

BimCraft App codeOur engines Built · in the lab 3 – docs/0.9-sessions/perf-wave3/
FixPERF.39 Link to PERF.39Comment on PERF.39 PartCraft: a rebuild is one synchronous task (750 features 3.0 s, a 40 by 40 hole plate 8.9 s, every edit 1.3 to 1.6 s) and the D7.51 checkpoints save nothing

Measured in /use 0.8.1 (tools/perf/apps3d-partcraft.mjs): rebuilds are linear (4 to 8 ms per feature, 5.6 ms per hole: 50 features 0.32 s, 200 1.6 s, 750 3.0 s; plates 10x10 0.43 s, 20x20 1.5 s where the 0.5 JS died, 30x30 3.7 s, 40x40 8.9 s), but rebuild() (partcraft.js:351 into the manifold wasm) runs on the page thread as one task, so the app freezes for the whole of it, and an edit of the LAST feature with the checkpoint costs 1,475 ms against 1,352 ms for a full rebuild because prefixKeys (kernel.js:814) hashes every feature's JSON per rebuild. Change: the mesh kernel in a worker like brep-worker.js with progress and cancel, cheap prefix hashing (a per-feature hash kept on the feature), undo and redo (1.6 and 1.3 s today) from cached results. Healthy: orbit at 15 draw calls, the Parameters window 5 ms. PARTLY BUILT in /lab 2026-11-14 (mesh kernel): a part whose last build took 80 ms or more, or that looks big when opened (150 solids by pattern counts), rebuilds in a worker (mesh-kernel-worker.js, the same kernel.js), the build chip shows Rebuilding… with a percentage, the newest request wins and a build running over 1.5 s for an older part is stopped. Longest page task, before to after, same machine: open 750 features 2.4 s to 0.09-0.12 s, edit last extrude 1.46 s to 0.08-0.12 s, undo 1.59 s to 0.08 s (and 1.6 s to 0.6-0.7 s to built), redo 1.85 s to 0.07-0.09 s, thicker first plate 2.3 s to 0.07 s, three quick edits 1.8 s to 0.07 s, plate-40 7.9 s to 0.16 s (page heap 340 to 84 MB). Small parts still build at once on the page. The worker's result equals the page kernel's (Node checks). Help: Change a part through its history. Log docs/0.10-sessions/model-part-10.md, docs/results/0.10/model-part-10.md. BUILT 2026-11-20: hashing is 2 ms of a 965 ms edit, so no per-feature revision (docs/0.11-sessions/model-part-11.md).

PartCraft App codeOur engines Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
FixPERF.42 Link to PERF.42Comment on PERF.42 Website: Library browse sorts every published item on a computed key and counts them again on every page; at 100x it is seconds per page

Partly built (site-inbox-11 2026-11-20). Migration 157-library-sort-at.sql APPLIED on the live DB 2026-11-20 (bin/install.php, with 158 and the sandbox copy: 12 s in all; 13,875 rows, table 11 MB): library_items.sort_at DATETIME NULL (nullable on purpose: until library-11's writers keep it, a NULL row is still read through the old expression), filled from COALESCE(current version published_at, updated_at) with updated_at = updated_at so no item's updated_at moved (0 NULL, 0 differing from the formula), and idx_browse_sort (visibility, status, sort_at, id), idx_browse_kind (visibility, status, kind, sort_at), idx_browse_cat (visibility, status, category, sort_at). Measured, mysql client incl. about 15 ms start-up, 3 runs: default browse order (24 ids) 64-75 ms with the COALESCE + join -> 17 ms with ORDER BY sort_at DESC, id DESC. Nothing reads the column yet. Was: Partly built (perf-site-10 2026-11-13). COUNT, category chips and class counts leave out the join to library_versions when no condition reads it (primary-key join, same rows, index-only on idx_browse). Not built: the sort_at column and keys for the default sort (64 ms filesort), keyset pages, cached counts: every writer of current_version_id and the importers must change together, designed in docs/LIBRARY-1000X-DESIGN.md 3.1-3.3. Was: LibraryItems.php:152-157 orders by COALESCE(v.published_at, i.updated_at) DESC after the join, so LIMIT cannot help: EXPLAIN shows all 13,846 rows read through idx_browse, joined, then a filesort (64 ms) plus SELECT COUNT(*) (30 ms) plus categoryCounts (:171, 30 ms) per request; OFFSET 960 BUILT 2026-11-21 (perf-finish-11), lane site, in /lab (a Discord member) only: All 17 library_items writers keep sort_at (LibraryItems::syncSortAt, updated_at untouched); drift check bin/library-sort-at.php (one drift fixed). With LIBRARY_SORT_AT=1 a browse page 118 -> 15 ms (page 400: 155 -> 36 ms), pages, order and totals identical in 193 cases; test-library-pages 406 / 0 with the switch on and off. LIVE 2026-11-22 (owner's go: "go do what is necessary"): .env LIBRARY_SORT_AT=1 is on; nightly drift check /etc/cron.d/cadcraft-library-sort-at (04:40, www-data, logs/library-sort-at.log); check at switch-on: 0 of 13,886 rows differ; test-library-pages 408 / 0 with the switch on.

– Site and services Built · in the lab 3 – docs/0.9-sessions/perf-wave3/
FixPERF.43 Link to PERF.43Comment on PERF.43 Website: Library search is LIKE '%q%' on four columns while an unused FULLTEXT index sits on exactly those columns

Partly built (site-inbox-11 2026-11-20). Migration 158-library-search-ngram.sql APPLIED on the live DB 2026-11-20: FULLTEXT ft_search_ngram (name, maker, model, description) WITH PARSER ngram beside ft_search (kept). The server's ngram_token_size is 2 (a startup variable shared by every site on this MySQL, not 3). Measured, MATCH ... AGAINST ('door') count: 52 ms (LIKE substring) -> 16-18 ms. Caution for the switch: two FULLTEXT indexes now cover the same four columns, so a MATCH over them may use either; library-11 should confirm which one browseWhere gets (and that LIBRARY_SEARCH_FULLTEXT results are unchanged) before it flips. Nothing reads the new index yet. Was: Built behind .env LIBRARY_SEARCH_FULLTEXT=1, OFF (perf-site-10 2026-11-13). It is not the same result set: on 28 words FULLTEXT word starts found 0 items the substring search misses and missed 0 to 397 per word that the substring search finds (table 942 against 545, bed 495 against 273, light 1,029 against 835; matches inside longer words). Waits on the owner: is search by word start the product? Same pages, HTML identical while off. Was: LibraryItems.php:200 browseWhere runs (i.name LIKE ? OR i.maker LIKE ? OR i.model LIKE ? OR i.description LIKE ?) with %q%; the schema has ft_search (name, maker, model, description) and sys.schema_unused_indexes lists it. EXPLAIN: 52 ms scanning 13,846 rows today versus 16 ms with MATCH … AGAINST ('door' IN BOOLEAN MODE) reading 1,324 rows from the index; at 1 M items about 3.7 s versus tens of ms. Fix: for queries of three or more characters use MATCH(i.name, i BUILT 2026-11-21 (perf-finish-11), lane site, in /lab (a Discord member) only: Library search pre-filters with MATCH AGAINST on the ngram index (migration 158) behind LIBRARY_SEARCH_NGRAM, the existing substring test still decides: identical results over the whole table on 327 queries (bin/test-library-search-ngram.php 442 / 0); rare words much faster (zeman 38 -> 0.9 ms), common letter pairs slower (hinge 31 -> 55 ms). LIVE 2026-11-22 (owner's go): .env LIBRARY_SEARCH_NGRAM=1 is on (ngram pre-filter, the same results as before; word-start LIBRARY_SEARCH_FULLTEXT left off); test-library-search-ngram 442 / 0, test-library-pages 408 / 0 with it on.

– Site and services Built · in the lab 1 – docs/0.9-sessions/perf-wave3/
PlatformPERF.44 Link to PERF.44Comment on PERF.44 Website: session_activity and analytics_visitors hold 1.6 M rows and 1,015 MB (83 % of the database), 42 % bots, no retention, one table never read

Partly built (site-11 2026-11-20). bin/test-analytics-prune.php 8/0. New switch ANALYTICS_VISITORS_OFF=1 (OFF) stops the analytics_visitors upsert on every page view (the table is read by nothing: checked across public_html, bin, tools); the retention job keeps pruning what is there. The nightly prune is still off (ANALYTICS_PRUNE=1, 400 days). Was: Partly built (perf-site-10 2026-11-13). AnalyticsRetention + bin/analytics-prune.php (batches of 5,000 on the date index, one run at a time, tests 8/0), OFF until .env ANALYTICS_PRUNE=1; 400 days default (ANALYTICS_RETENTION_DAYS), optional shorter bot window; today it counts 0 rows (oldest row 2026-10-10). Cron line is in the script header for the owner. Not built: no rows for bot page views, the daily rollup table, stop writing analytics_visitors, dropping idx_session. Was: Measured: session_activity 1.02 M rows / 646 MB growing 51,086 rows a day (21,675 of them is_bot = 1), analytics_visitors 597k rows / 369 MB growing 38,644 a day because a cookie-less client gets a fresh visitor id on every request; the table is written on every page view (Analytics.php:75) and read nowhere. Nothing prunes either (no DELETE in bin/ or the classes except the smoke test's own rows). The report queries full-scan the table (EXPLAIN ANALYZE: summary 1.8 s, topPages 2.4 s, each audience group 1.7 s, tryOpens 1.3 s), so the nightly warm job is roughly 60 to 80 s of scans that push the whole table through a 1 GB server-wide buffer pool these two tables alone fill. CadCraft analytics is about 1.1 inserts a second, over half of all INSERTs on this MySQL, each an fsync (two autocommits per page view). At 10x the warm job takes ten minutes and evicts every other database on the server. Fix: (1) do not store bot page views as rows (count per day per bot name in a small table) and give a visitor with no cc_vid cookie no analytics_visitors row until the second request; (2) retention for humans (owner's number; 30 days for any bot rows kept…

– Site and services Built · in the lab 4 Owner: ANALYTICS_PRUNE=1 with the cron line in bin/analytics-prune.php (400 days), and ANALYTICS_VISITORS_OFF=1 docs/0.9-sessions/perf-wave3/
FixPERF.45 Link to PERF.45Comment on PERF.45 Website: the test suites' cleanup DELETEs are the most expensive statements on the production server (1.3 s full scans of the biggest table)

Partly built (site-11 2026-11-20). Measured again over the digests since the restart: the smoke test's two DELETEs are 65 ms and 0.56 s (was 4.6 s), email_log DELETE 39 ms x 24, form_throttle 5.8 ms x 82, hardware_reports DELETE WHERE build = 'hwtest' 46 ms x 8 (bin/test-hardware.php:23): about 4 s in all, no longer the top statements. The remaining edits are in test files: Inbox line to tests-11 (add created_at / reported_on bounds that use idx_created / idx_day; split the email_log OR into two statements). Was: Partly built (perf-site-10 2026-11-13). bin/smoke-test.php cleanup limited to the last 6 hours on the created_at index: session_activity DELETE 4,607 ms (full scan, load 27) to about 70 ms; download_events 67 ms to 7 ms; email_log narrowed the same way. The other test files' email_log DELETEs (43 ms each) are unchanged. Was: performance_schema digests over 12 days: DELETE FROM session_activity WHERE query_string LIKE ? (bin/smoke-test.php:51) ran 174 times at 1.30 s each, 225 s in all, 129 M rows examined (a full scan of the biggest table per run; the next most expensive digest on the server is COMMIT at 178 s); DELETE FROM email_log WHERE to_email LIKE ? OR (template = ? AND body_text LIKE ?) 231 runs at 43 ms scanning a mediumtext (test-resources, test-owned, test-reply-drafts, test-bidding, test-a Discord member-api); DELETE FROM download_events WHERE referrer LIKE ? 174 runs; DELETE FROM form_throttle WHERE action LIKE ? OR action LIKE ? 433 runs. These run while visitors browse. Fix: capture MAX(id) when a test starts and delete WHERE id… Verified 2026-11-20 (0.11 close-out): re-ran bin/test-hardware.php (28/0), test-mail (50/0), test-resources (269/0) and test-site-07 (203/0) as www-data; their edited cleanup DELETEs ran and cleaned up. EXPLAIN on the live DB: hardware_reports DELETE uses idx_day, the email_log DELETEs use idx_to and idx_created, smoke-test session_activity and download_events DELETEs use idx_created. No full scan of the biggest table remains.

– Tests and tooling Built · in the lab 1 – docs/0.9-sessions/perf-wave3/
FixPERF.46 Link to PERF.46Comment on PERF.46 Website: staff pages with uncached GROUP BY scans: /admin/library/metrics 887 ms, /admin/library 422 ms, /admin/hardware 265 ms

Partly built (site-11 2026-11-20). Nothing new in code; measured with STAFF_REPORT_CACHE=1 in a child process (rule 75): /admin/hardware 993 ms to 35 ms (second view), /admin/library/metrics 7,226 ms to 158 ms, /admin/library 1,011 ms to 36 ms; the first view after ten minutes still pays the full cost. /admin/hardware HTML identical both ways. The hardware summary's 13 GROUP BYs stay as they are (ties in ORDER BY n DESC LIMIT 30 are undefined, so one pass could not be proved identical). The Library report classes are library-11's. Was: Partly built (perf-site-10 2026-11-13). RoadmapItems::groups (7 calls) and MailLog::countsByStatus (2) once per request: /roadmap-issues 117.7 ms and 20 queries to 73.5 ms and 13. LibraryMetrics::report, possibleDuplicates and HardwareReports::summary read a 10-minute cache behind .env STAFF_REPORT_CACHE=1, OFF (a figure may be 10 minutes old). The hardware summary's 13 GROUP BYs were not merged: ties in ORDER BY n DESC LIMIT 30 are undefined, so identical output could not be proved. Was: LibraryMetrics::report (LibraryMetrics.php:129, :151, :156) is 430 ms of the metrics page, one statement 222 ms (a 41k-row range on uq_once_a_day, a sort and COUNT(DISTINCT who)), linear in rows (2,157 new rows a day, 4 s at 10x). LibraryVersions::possibleDuplicates (LibraryVersions.php:587-604) is 383 ms per /admin/library view, a self-join over 27k versions that finds nothing today. HardwareReports::summary (HardwareReports.php:93) runs 13 GROUP BY scans of all 25,914 rows (240 ms; idx_day cannot help because every row is inside 90 days). MailLog::countsByStatus (MailLog.php:180) runs twice on /admin/mail (53 ms); RoadmapItems::groups runs seven times on /roadmap-issues with the same arguments. Fix: Cache::remember(…, 600) around report, summary and possibleDuplicates (the dashboard already works this way); better for duplicates, set duplicate_of_version_id at publish time in LibraryVersions::create (one indexed lookup on idx_item_sha / idx…

– Site and services Built · in the lab 1 Owner flips STAFF_REPORT_CACHE (staff figures up to 10 minutes old); first view after expiry is still slow docs/0.9-sessions/perf-wave3/
FixPERF.47 Link to PERF.47Comment on PERF.47 Website: missing, redundant and dead indexes (DDL in the report)

Partly built (site-11 2026-11-20), migration 156: dropped session_activity.idx_session and analytics_visitors.idx_user and idx_bot, which nothing reads (grep of public_html, bin and tools: the only session_id match is a test's INSERT; analytics_visitors is written and never read). Applied by bin/install.php (only 156 was pending), metadata-only on InnoDB, no table or row touched. Pages unaffected (no output reads these). Left: discord_messages author and time indexes wait for the Discord reader (1,852 rows, nothing to measure). Was: Partly built (perf-site-10 2026-11-13), migration 153. idx_submission on library_versions (46 ms scan to 0.42 ms), idx_action_time on audit_log (17.3 to 0.56 ms), idx_item_key on roadmap_items (0.63 to 0.40 ms); dropped library_metrics.idx_day and broadcasts.idx_status (prefixes). Not done: session_activity.idx_session and the analytics_visitors indexes wait for PERF.44's retention; discord_messages waits for the reader. Was: Missing: library_versions.submission_id (LibrarySubmissions::outcome, LibrarySubmissions.php:353, full-scans 27,185 rows, 40 ms per call; 26,537 versions carry a submission id) → ADD KEY idx_submission (submission_id). audit_log.action (Audit::search/searchCount :157-184 with a.action LIKE ?, StripeApprovals::siteRecords :71, DiscordConversations::itemsForMatching :321, Broadcasts::version :463; 52,791 rows growing 1,820 a day) → ADD KEY idx_action_time (action, created_at). roadmap_items.item_key alone (RoadmapSuggestions::findItem :28, ReplyDrafts::usedItems :99 query without release, so uq_release_key cannot serve them; every /suggest review runs it) → ADD KEY idx_item_key (item_key). discord_messages author_id and posted_at (DiscordInbox.php:431, :569, :54, :58; low, read BUILT 2026-11-21 (perf-finish-11), lane site, in /lab (a Discord member) only: Migration 160 (discord_messages idx_author, idx_posted) applied; author lookup 0.445 -> 0.159 ms, identical answers. With migrations 157/158 every index in the report is done.

– Site and services Built · in the lab 1 – docs/0.9-sessions/perf-wave3/
FixPERF.48 Link to PERF.48Comment on PERF.48 Website: ordinary Library page views read every published item (publicStats, LanguageNames::inUse, makers, forUser without LIMIT, a 652 KB cache per page)

Partly built (perf-site-10 2026-11-13). LibraryMetrics::totals decoded once per request (650 KB JSON per card before). publicStats measured: aggregate SQL is slower than the PHP loop (66 ms against 43), so it was left; inUse, makers and forUser untouched. A stored stats row is the design (docs/LIBRARY-1000X-DESIGN.md 3.6). Was: LibraryItems::publicStats (LibraryItems.php:278-295) pulls every published row with its author and version into PHP to count authors and categories: 42 ms per view of /library and /library/author. LanguageNames::inUse (LanguageNames.php:77-83) joins all items to their versions (a UNION with addon_listings) on every Library page to learn that two languages exist: 28 to 44 ms. LibraryItems::makers (:268) SELECT DISTINCT maker over all published rows per browse page (fast today, linear later). LibraryItems::forUser (:221) has no LIMIT: the system account's /library/mine loads 13,844 rows. LibraryMetrics::totals is cached, but the cache file is 652 KB of JSON decoded on every card page (that is the 367 ms "PHP" of /library/browse). Fix: publicStats as one GROUP BY or Cache::remember 600 s with the key dropped in LibraryItems::refresh; cache inUse and makers the same way (or compute inUse in the seed); forUser paged by 50 like LibrarySubmissions::forUser; metrics labels read the per-ref rows (idx_ref) for the 48 refs on the page instead of the whole totals file. At 1 M items each of these is seconds; with the fix they are constant. library-11 2026-11-20: publicStats and makers cached behind LIBRARY_STATS_CACHE=1 (see PERF.12, identical output). Not done: LanguageNames::inUse (28 to 44 ms) is site-11's class; forUser has callers that expect every row (a LIMIT changes output): Inbox to site-11. LANDED 2026-11-20 (inbox-11b) LanguageNames::inUse() reads through Cache::remember (600 s) when LIBRARY_STATS_CACHE=1; off = unchanged. Cold, warm and uncached output identical. (inbox-11b)

– Site and services Built · in the lab 1 Owner flips LIBRARY_STATS_CACHE. docs/0.9-sessions/perf-wave3/
FixPERF.49 Link to PERF.49Comment on PERF.49 Website: every signed-in page view runs the account-menu queries (5 to 6 statements; 12 Licenses::forOrg calls on /account)

Partly built (site-11 2026-11-20). Behind .env ACCOUNT_PAGE_MEMO=1, OFF: /account answers Organizations::forUser, Licenses::forOrg, Licenses::seatFor and StoragePlans::inForce once per request (PageMemo; the page only reads). Measured in a child process with the switch on, HTML byte-identical: 66 queries to 39, SQL 18.9 ms to 8.2 ms, 65 ms to 50 ms (load 30+). Every other signed-in page already runs each of them once (1.5 ms), so nothing else changes; the 60 s session cache the row proposed is still not built (four services would have to invalidate it). Was: Checked (perf-site-10 2026-11-13), not built: measured 1.5 ms per signed-in page. A memo needs begin() on every signed-in page, or a session cache invalidated by four services (Licenses, Organizations, StoragePlans, seats): risk higher than the gain today. Was: navbar.inc:36 → Organizations::listedFor → forUser (Organizations.php:181, a correlated member COUNT), then per workspace Licenses::summary → forOrg (two statements), Licenses::seatFor and StoragePlans::inForce: 5 to 6 statements and about 1.5 ms on each of the 61 pages profiled, 12 forOrg calls on /account. With one workspace per account this is small; with teams it is three statements per workspace per page. Fix: compute listedFor once per request (static memo) and keep the menu's result in $_SESSION with a 60 s stamp, invalidated by Licenses::assign/unassign/grant and Organizations::addMember/removeMember (or the touched() hook the dashboard already uses).

– Site and services Built · in the lab 1 Owner flips ACCOUNT_PAGE_MEMO (gain 66 to 39 queries on /account; risk none seen, output identical; roll back: unset it) docs/0.9-sessions/perf-wave3/
FixPERF.56 Link to PERF.56Comment on PERF.56 Apps: the shell costs 154 to 257 ms of main thread per start, and three document-wide MutationObservers fire 100+ times a second while drawing

Measured per app: app-phone.js 17 to 56 ms running the phone layout on a desktop viewport; app-boot.js 10 to 73 ms with a body-subtree MutationObserver whose say() rewrites the DOM on every mutation (app-boot.js:82-83) and never settles while the pointer moves (141 to 221 boot-step rewrites in 3 s of drawing); three observers cascade (app-shell.js:477-482, app-phone.js:421 and :483; CadCraft 360 observer callbacks in 3 s of drawing); app-settings.js 15 to 65 ms; app-devices-ui.js 26 ms. Shell bytes: 1.35 MB fetched, about 780 KB never run (app-addons-account.js 59 KB when signed out, calc.js, ai-*.js, app-devices-ui.js, app-propgrid.js). Change: app-phone returns after the matchMedia check on wide pointer-fine screens and attaches its observers only when cc-phone is on; app-boot ignores mutations inside output-like elements and disconnects on settle; app-shell observes dialog additions only (or an attributeFilter without childList on the whole tree); dynamic-import addons-account, calc, ai-*, devices-ui on first use. PARTLY BUILT 2026-11-20 (inbox-11). Shell side done by shell-start-11 (app-start-tip.js 96.1 to 2.1 ms). Workspace side: app-workspace-icons.js watchAppGlyphs schedules its pass only when a record adds an app glyph; app-workspace-popout.js watches only the attributes sync() copies; app-panels.js skips a body class write that leaves the class unchanged; app-dock.js follows only the Arrange class. Measured with tools/perf/she BUILT 2026-11-21 (perf-finish-11), lane scale-shell, in /lab (a Discord member) only: app-popfit.js observer callback does only the cheap name test; the style check and anchor lookup wait for the next frame. Fair A/B on workstation11a (3 runs, alternating): CadCraft 17.8-19.0 -> 3.6-4.7 ms (+0.7-0.9 ms frame work), MarkupCraft 6.4-7.0 -> 1.4-2.3 ms; same menus fitted (browser-popfit 19 / 0); real pop-out and Arrange runs on the VPS (pop-out observers 1-2, dock 1-3 fires in 8 s). The pop-out rerun on workstation11a did not run (signed-out page).

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App shell Built · in the lab 3 – docs/0.9-sessions/perf-wave3/
FixPERF.57 Link to PERF.57Comment on PERF.57 Apps: start-up work for panels nobody opened: BimCraft massing 191 ms, ModelCraft swatches 182 ms plus 650 ms idle tasks, CivilCraft plants seed, exr table

BimCraft massingOptions() runs 191 ms inside mountProgram (design-ui.js:77); ModelCraft paints a swatch per library material from 128 px procedural textures at start (modelcraft.js:557, :581; 182 ms) and is the only app with long tasks during idle (650 ms); CivilCraft fetches and cleans plants-seed.json (198 KB) at start (landscape-ui.js:117); exr/util.js builds a 65,536-entry half-float table at import (exr/util.js:38-46); three.module.js top level is 65 to 94 ms. Change: compute on first open of the panel or first paint of the palette (IntersectionObserver or the tab event), fetch plants on first Landscape use, build the half-float table lazily. 0.2 to 0.4 s of blocking per start in the 3D apps. MODELCRAFT PART BUILT in /lab 2026-11-14: the library's texture swatches are drawn only once the material list shows (they were all drawn in the first second, while the list is laid out before its panel folds it). Start-up in /lab: 1.37 s blocking in 9 long tasks, quiet in 4.6 s (load 7.8) to 0.49-0.64 s in 3-4 tasks, quiet in 2.3-3.1 s (load 1.6-3.4); drawSwatches gone from the start profile; opening Materials draws them (page test). BimCraft massing was already lazy (bim-core-10). Log docs/0.10-sessions/model-part-10.md, docs/results/0.10/model-part-10.md. PARTLY BUILT in /lab 2026-11-14, CivilCraft only: the plants seed loads on first use or when idle. No browser start-up number was taken. CIVILCRAFT PART MEASURED 2026-11-20 (civil-11): /lab start-up, 5 loads each, alternated, medians: plant seed loaded in the start-up task 9 long tasks / 1,075 ms blocked until read BUILT 2026-11-21 (perf-finish-11), lane bim, model, in /lab (a Discord member) only: BimCraft: massing code 0 ms in start-up (5 loads on workstation11a), the panel builds when asked for (93 ms). ModelCraft: start on workstation11a 1 long task of 54-56 ms, 0 idle long tasks in 12 s. exr: half-float table built on first use, module import 7-14 -> 1.5-2 ms (exr test 172 / 0). CivilCraft plants seed was done in civil-11.

BimCraftModelCraftCivilCraft App code Built · in the lab 2 – docs/0.9-sessions/perf-wave3/
PlatformPERF.59 Link to PERF.59Comment on PERF.59 Apps: no service worker until someone clicks "Save for offline"; every repeat visit is a cold start minus the 7-day HTTP cache

app-offline.js:160 registers /sw.js only on the click, and sw.js:46 installs nothing on its own; the PWA manifest promises more than the page delivers. Every visit refetches the 830 to 940 KB app page (PERF.2, PERF.3) and relies on the HTTP cache for the 300 to 500 module files (which Vary: Referer defeats, see the server rows). Change: register /sw.js on every /use page; cache-first for immutable URLs (?v= and pinned vendor/app folders: the worker already knows the rule, sw.js:33-40), stale-while-revalidate for the page; "Save for offline" stays the explicit full copy. Pairs with the shared-URL row (a shared lib URL is cached once for all apps) and the installed-package row. Built behind PERF_SW_RUNTIME (off): the worker is registered as /sw.js?rt=1 and keeps versioned /assets/ files (?v=, versioned vendor and release folders, hashed catalogs) in cc-runtime:v1, newest 2,500; the first visit hands it what it loaded (MarkupCraft: 170 files kept on the first visit). Rules in the head of sw.js: GET, same origin, /assets/ only, 200 only, never a lab a Discord member build, never a page, so nothing with a CSRF token or account data. Without ?rt=1 the cache is deleted. Repeat-visit time is not measured yet (Playwright's second visit already hits the HTTP cache). (perf-start-10 2026-11-13: docs/0.10-sessions/perf-start-10.md; numbers docs/results/0.10/)

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App shell Built · in the lab 3 Owner: flip PERF_SW_RUNTIME=1 (or lab) in .env docs/0.9-sessions/perf-wave3/
FixPERF.63 Link to PERF.63Comment on PERF.63 Website: a distributed crawl of /roadmap-issues filter combinations is about half of all PHP page requests (485,944 in 8 days, 172 ms and 1.4 MB of HTML each)

Partly built (site-11 2026-11-20). Row cache behind .env ROADMAP_ROWS_CACHE=1, OFF: the visitor view's schedule rows are rendered once per release (one 1.4 MB Cache entry per release, replaced when items, links, comments or hidden names change, or after 10 minutes) and a filtered view only adds `hidden`. bin/test-roadmap-rows-cache.php: 7 filters, off, on cold, on warm, HTML byte-identical in all 21 renders; a filtered render 500 to 640 ms down to 83 to 115 ms (load 30+; the render of a cached release is a string copy per row). Earlier: nofollow on the filter links, and robots Disallow behind ROBOTS_DISALLOW_ROADMAP_FILTERS (off). Was: Partly built (perf-site-10 2026-11-13). rel=nofollow on the map's filter links (HTML otherwise identical); robots.txt Disallow: /roadmap-issues? behind .env ROBOTS_DISALLOW_ROADMAP_FILTERS=1, OFF (the page stays reachable and noindex). The render cache is not built: the crawl's URLs are nearly all different, so a per-URL cache would rarely hit and would fill the disk with 1.4 MB files; the fix is to render the item list once per release and apply the filter as markers. Was: Access logs: 485,944 requests to /roadmap-issues in 8 days (184,651 on Nov 6); in the last 5 hours 24,548 requests from 17,356 distinct IPs with browser user agents and fake referers, every permutation of ?app=&channel=&kind=&layer=&release=; 23,831 of the last 49,776 dynamic requests. Each costs 172 ms of PHP, 23 queries and 1,416 KB of HTML (112 KB gzipped): about 23 CPU-hours and 54 GB of egress in 8 days, invisible on /admin/analytics because Analytics::SKIP_PREFIXES has /roadmap-issues. The crawl ignores robots, so per-IP throttling cannot help. Change: render the item list once per release into Cache (60 s) and filter from it (172 to about 20 ms); rel="nofollow" on every filter link and a canonical URL per release; if the page stays reachable by link, filter client-side on the cached list. Removes about 45 % of PHP CPU and most HTML egress today; the …

– Site and services Built · in the lab 3 Owner flips ROADMAP_ROWS_CACHE and ROBOTS_DISALLOW_ROADMAP_FILTERS (visitors see item changes within a minute of the fingerprint change) docs/0.9-sessions/perf-wave3/
FixPERF.64 Link to PERF.64Comment on PERF.64 Website: a session file is written for every anonymous page view (312,607 files, 1.3 GB, 92,632 a day, GC 38 s)

Partly built (site-11 2026-11-20). Behind .env SESSION_LAZY=1, OFF: a first visit (GET, no session cookie, HTML page, not /api /download /assets) opens no session file; is an array for the request, the output is held (4 MB), and cc_lazy_session_commit() opens the session at the end only if the page wrote into it (the cookie goes out before the held output). A write that cannot be kept is logged, never silent. bin/test-lazy-session.php 37/0 on the real site under PHP's built-in server: 20 public pages byte-identical off and on; /great-eight /faq /pricing /library /use /use/cadcraft /legal/terms /press-kit /tutorials /status /whats-new leave no file and no cookie; /login /signup /suggest /roadmap /roadmap-issues /download /education /forgot-password still get theirs (they carry a CSRF form); CSRF refusal (no cookie, wrong token), wrong-password round trip with the email kept, sign-in, flash once, /account, /use/cadcraft keep working. Not solved: the crawled page /roadmap-issues has a form, so it still opens a session (the 48 h sweep keeps handling those). Was: Checked (perf-site-10 2026-11-13), not built: bootstrap.php starts the session before any page code and more than a hundred places write $_SESSION directly, so a lazy start would lose writes on a first GET (CSRF tokens, flash, sign-in). Needs a single session write path first; then the switch. Was: sessions/ holds 312,607 files, 98.8 % under 120 bytes (a CSRF token or nothing), 92,632 written in 24 h and still 7,574 an hour after today's crawler change; the directory inode is 142 MB (a directory never shrinks); session-gc takes 38 s every 6 h (38,589 CSRF-only files removed per run). Every page view is open, flock and write of a file; the per-session lock also serializes one visitor's parallel requests. (FX.136 shortened the lifetime; this removes the cause.) Change: start the session lazily, only when a cc_session cookie arrives or something is written (csrf_token(), flash(), sign-in); a signed double-…

– Site and services Built · in the lab 3 Owner flips SESSION_LAZY (fewer session files for pages without a form; /roadmap-issues still opens one); a form-free suggest box on that page would remove the docs/0.9-sessions/perf-wave3/
FixPERF.69 Link to PERF.69Comment on PERF.69 Website: the developer API makes three writes per keyed call (last_used_at, throttle, request log), health polls included

Partly built (site-11 2026-11-20). bin/test-a Discord member-api.php 149/0 with DEVAPI_LIGHT_WRITES=1 given to the process and with it off. By the code a repeat keyed call writes one row (the throttle INSERT) instead of three, and a 200 on /v1/health no row in a Discord member_api_requests. Not measured under load: the measuring script needed a licensed fixture account the session did not make. Was: Built behind .env DEVAPI_LIGHT_WRITES=1, OFF (perf-site-10 2026-11-13): last_used_at at most once a minute per key (and when the caller's address changes), no a Discord member_api_requests row for a 200 on /v1/health; every other call and every failure is still logged. test-a Discord member-api 149/0 with the switch off; not measured under load. Was: DevKeys::inspect runs UPDATE a Discord member_api_keys SET last_used_at, Throttle::hit an INSERT and DevApi::log an INSERT on every call, 200s on /v1/health and 404s too; each autocommit is an fsync with innodb_flush_log_at_trx_commit 1. Load test: api host /v1/health 679 req/s, /v1/endpoints 763, /v1/status 364 at c=10, zero failures (the floors are fine: health 3.6 ms). At 1000x (an integrator polling once a second) the writes are the cost. Change: update last_used_at at most once a minute per key, skip the request log for health 200s, keep it for everything else; a Discord member_api_requests is pruned at 30 days already.

– Site and services Built · in the lab 1 Owner flips DEVAPI_LIGHT_WRITES (gain: 3 writes to 1 per call; risk: last_used_at up to a minute old, no log row for health 200s) docs/0.9-sessions/perf-wave3/
Sanity checkPERF.70 Link to PERF.70Comment on PERF.70 Server: operations checks: two cron jobs without a lock, status-check's serial probes, no Apache scoreboard, static files gzipped per request

Partly built (site-11 2026-11-20). flock added to bin/upgrade-notify.php tick (cron every minute; two overlapping runs could mail twice; tested: a second run exits in 0.1 s while the lock is held). Audited every bin script a cron file runs: the others have a lock, flock in the cron line (cdn-resize, cdn-short) or run once a day. status-check keeps its 60 s cap. Owner's: the /server-status vhost rule and any cron file. Was: Partly built (perf-site-10 2026-11-13). flock added to bin/mail-poll.php and bin/a Discord member-sandbox-sync.php (tested: a second run exits at once); StatusMonitor::runChecks stops retrying failed probes after 60 s (test-status 36/0). Owner's: the /server-status vhost rule and any cron file. Was: bin/mail-poll.php (IMAP, every 5 min) and bin/a Discord member-sandbox-sync.php (every 10 min) have no flock while every other job has one; status-check runs 7 probes serially with 12 to 40 s timeouts plus 5 s retry sleeps (about 2 min worst case inside a 5-min slot; MeCentral timed out once on 2026-11-07). mod_status is on (Require local) but /server-status is rewritten to the 404 page by the catch-all .htaccess, so there is no scoreboard for bin/admin-perf.php --http or future measuring. Static JS is gzipped on every request: cadcraft.js 198 to 59.5 KB costs 9.0 ms p50 against 0.7 ms for an uncompressed file through the same .htaccess, 147 req/s at c=10 and p99 1,029 ms at c=20 (PERF.16 carries the fix: pre-compressed .br/.gz siblings and an immutable one-year cache). Changes: add the flock, run the probes with curl_multi or cap the total at 60 s, a <Location /server-status> with RewriteEngine Off in this site's vhost. Load floors for the record (c=10, keep-alive, zero failures): health 775 req/s, catalog 303, /status 189, / 80, /apps/cadcraft 58, /use/cadcraft 17.4 req/s at p50 586 ms (its 830 KB page is the throughput ceiling: PERF.2, PERF.3).

– Site and servicesTests and tooling Built · in the lab 1 Owner: the /server-status vhost block and the cron lines in the log (files under /etc/cron.d) docs/0.9-sessions/perf-wave3/
FixPERF.71 Link to PERF.71Comment on PERF.71 Code: eight app mains are one closure of 2,500 to 5,800 lines each; split by topic

Partly built (code-mains2-10 2026-11-16). Every one of the eight app mains is now split once, each app whole, in /lab only (no live code, rule 62). Main lines before to after: DetailCraft 2,704 to 1,950, CadCraft 3,410 to 2,441, TakeoffCraft 4,808 to 3,820, PartCraft 4,015 to 3,102, MarkupCraft 4,985 to 4,459, CivilCraft 3,209 to 2,378, ModelCraft 4,037 to 3,299, BimCraft 6,317 to 5,874; 31 new modules (mountX(ctx)). Each app has a guard test, tools/<app>-test/browser-main-10.mjs (real dialogs, downloads and imports; fails on any console or page error), run on the ORIGINAL main and on the split one: 27/0, 14/0, 12/0, 13/0, 7/0, 10/0 (TakeoffCraft, PartCraft, MarkupCraft, CivilCraft, ModelCraft, BimCraft) both times, plus DetailCraft 31/0 and CadCraft 15/0 from code-mains-10. The apps' existing browser suites give the same counts before and after, except rows that flip between runs on the original too (listed in the log). The guards found three bugs in tools/perf/main-extract.mjs, all fixed and every earlier module re-audited: a canvas ctx parameter shadowing the mount's ctx, a module-level const read before it was set, a module-level let left bare, plus a duplicate edit. Packed browser editions built and checked per app (rule 56). Still in the closures, reading 15 to 65 variables each: the pointer / touch state machines, act / command switches, the Properties renderers (some), openIfc / openFile, drawOverlay, the BimCraft Issues / Card / DWG / 3D code. Next: a second round on the big closures, with the state moved into one object first. Was: Partly built (code-mains-10 2026-11-16). Two of the eight mains split, each as a whole app, in /lab only. DetailCraft: detailcraft.js 2,704 to 1,950 lines (start() 2,605 to 1,854), eight modules (export-ui, mitre-ui, xf-ui, clipboard-ui, drawings-ui, ifc-import-ui, footing-stair-ui, clash-ui). CadCraft: cadcraft.js 3,410 to 2,441 (init() 3,199 to 2,239), six modules (plot-ui, save-ui, open-ui, text-edit, blocks-ui,… BUILT 2026-11-21 (perf-finish-11), lane r2: bimcraft, cadcraft, civil-detail, model-part, markup-takeoff, in /lab (a Discord member) only: Round two in all eight mains: closure lets into one state object (tools/perf/main-state.mjs), then topic code into mountX(ctx) modules (main-extract.mjs; no statement runs earlier than before). init()/start(): BimCraft 5,654 -> 1,129 lines (56 modules), CadCraft 2,287 -> 1,369 (16), MarkupCraft 4,349 -> 1,118 (31), TakeoffCraft 3,771 -> 848 (27), ModelCraft 3,230 -> 956 (12), PartCraft 2,995 -> 1,260 (12), CivilCraft 2,260 -> 1,381 (8), DetailCraft 1,878 -> 1,408 (7). Each app: a real /lab page guard (fails on any console/page error) and its bin/test-<app>.mjs equal before and after, other page tests equal (rows that already failed fail on the same lines); packed browser editions build and every import resolves (FX.440 fixed the packer). Duplicate lines from multi-statement lines checked and removed in every app.

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App code Built · in the lab 20 – docs/0.9-sessions/perf-wave3/
FixPERF.72 Link to PERF.72Comment on PERF.72 Code: 4,300 one-line functions that only pass arguments on (forwarder adapters rebuilt per sub-UI, help: () => t() closures)

Partly built (code-mains-11 2026-11-20). tools/perf/forwarders-rewrite.mjs (scope walk, arity kept) rewrote the object-literal forwarders `say: (m) => say(m)` that point at a hoisted function declaration, in the eight app mains, /lab only: CadCraft 13 of 30, BimCraft 44 of 114, ModelCraft 14 of 25, PartCraft 78 of 106, CivilCraft 81 of 175, TakeoffCraft 11 of 30, MarkupCraft 22 of 38, DetailCraft 20 of 35 (283 in all). Kept: wrappers of const/let/import (they exist because the target is not defined yet), functions that declare more parameters than the wrapper passes, functions using this/arguments. Result: all eight browser-main-10 guards unchanged (civil 13/0, model 7/0, bim 10/0, takeoff 27/0, markup 12/0, part 14/0, cad 15/0, detail 31/0, before and after); parse+compile median 4.6 to 4.0 ms civil, 5.0 to 5.2 part, 8.9 to 8.4 bim = noise, bytes -0.1 to -1.1 %. Waits on: the const-bound forwarders (move their targets to function declarations or pass late getters), the other files (commands.js 147 help closures, landscape-ui.js, sub-UIs). Was: Planned (code-mains2-10 2026-11-16): not started. Baseline measured and saved (docs/results/0.10/code-mains2-10-forwarders-before.txt): 4,000+ one-line forwarders; civilcraft.js 190 forwarders, bimcraft.js 152, partcraft.js 117, commands.js 147 help closures. A safe rewrite must keep arity (a wrapper (m) => say(m) is not the same as say when say takes a second argument) and only pass names of hoisted function declarations. Was: tools/perf/quality-forwarders.mjs: 2,299 forwarders plus 2,007 thin wrappers, 278 getters, 401 constant-return functions, 2,683 one-use helpers. Worst: civilcraft.js 182 forwarders (units: () => units(), say: (m) => say(m), row: (...x) => row(...x) rebuilt for four sub-UIs, lines 157-165), bimcraft.js 143, partcraft.js 117, landscape-ui.js 52 (the same {edit, LS, U} trio six times), commands.js 147 help: () => t('…') closures plus seven ask wrappers. This is read and parse cost and noise… BUILT 2026-11-21 (perf-finish-11), lane r2: all app lanes, in /lab (a Discord member) only: Forwarders and help closures: 161 removed in round one (const-to-function.mjs + forwarders-rewrite.mjs), then per app in round two: CadCraft commands.js 150 help closures are language keys (command list identical in en and es-MX); CivilCraft 51 -> 10, DetailCraft 15 -> 3, MarkupCraft 7 -> 4, TakeoffCraft 5 -> 3 (+9 in other files), ModelCraft 10 more gone (1 left), PartCraft 19 more gone (8 left), BimCraft mount-result forwarders gone with the split. The ones left change what their target receives (arity) or point at a name made later in start-up, so removing them would change behaviour. Guards and suites equal.

CadCraftBimCraftCivilCraftDetailCraftPartCraft App code Built · in the lab 3 – docs/0.9-sessions/perf-wave3/
FixPERF.73 Link to PERF.73Comment on PERF.73 Code: copies that drifted and hand copies with no sync tool (six inflate implementations, xlsx.js in four variants, input-mouse.js in eight apps)

Partly built (code-shared-11 2026-11-20). bin/test-sync-copies.mjs: 15 drifted to 4 (150 in step); the 4 left are language files (rule 57). Synced: SuperCad Studio copies (engineer, field, furnish, hull, photo-material, photosketch), modelcraft bcf.js, shell engines (live/read.js etc.), civilcraft bcf, cadcraft cfd/lbm3d, chunks.js x4, m3d view3d.js. New copy groups in tools/copies: wheel-pad (9 places), keynotes, pdf-snap, presence-pump. lib/ifc/step.js stepString/stepList/stepBool: CivilCraft ifc-civil + DetailCraft ifc.js use it, same bytes (1,776 checks, tools/ifc-test/test-step-string.mjs). Not done: crc32 in 14 libs, PartCraft ifc-export and Landscape ifc-landscape S (no lib/ifc copy / written 'no library'), takeoffcraft snap.js vs pdf-snap.js (deliberately different), language-file drift. Was: Partly built (code-shared-10 2026-11-16). bin/test-sync-copies.mjs runs every sync tool with --check (148 tools, hosts read from each tool's usage line): 134 in step, 14 drifted. Synced this session: dwg writer copies (4 apps), ifc (civilcraft, takeoffcraft), terrain tin.js, envir, engineer report, fem frame-model, process thermal, photosketch, scanbim, trusscraft, hull, printstage, office-standard, schematic/plant.js, CadCraft m3d kernel (FX.143 cause: m3d-sync refused the arcs import; now rewritten to ../arcs/arcs.js). New one-source tools: tools/zip (one zlib for lib/exr, 3dm, chip), tools/copies (input-mouse x8, handoff x7, panes, params, framing, bcf, render-tools, carbon-factors, libitem, font, lod, chip hdl: 23 unowned groups), CadCraft's 3 add-on xlsx.js now byte copies of lib/tables/xlsx.js. Suites after: cadcraft 2906/0, civilcraft 417/0, takeoffcraft 1260/0, detailcraft 13111/0, modelcraft 1556/0, partcraft 2917/1 (sketch arcs lang, not from this), bimcraft sweep 836 of 837 (the 1 GB DXF, scale-10). Not done: STEP S/E/L/B into lib/ifc/step.js, pdf-snap vs takeoffcraft snap, crc32 in 14 libs, the 8 SuperCad Studio copies (field, furnish, hull, ph… BUILT 2026-11-21 (perf-finish-11), lane code, in /lab (a Discord member) only: STEP helpers shared in lib/ifc/step.js and the SuperCad / pdf-snap groups added to tools/copies by code-shared-11 (pdf-snap.js and TakeoffCraft snap.js stay two files on purpose: different behaviour). crc32: the 14 lib copies stay (each lib syncs into the apps as a self-contained folder) and tools/zip/test-crc32-copies.mjs (19 / 0) fails if any copy drifts or a new one appears. bin/test-sync-copies.mjs is the guard for the rest.

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App codeTests and tooling Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
FixPERF.74 Link to PERF.74Comment on PERF.74 Code: shared utilities written hundreds of times: vector math 2,088 implementations, csv cell 431, point-in-polygon 243, esc 198, uid 188, download 163

Partly built (code-shared-11 2026-11-20). lib/geom2d pointInPolygon now also in CadCraft xclip.js and TakeoffCraft geom.js + pickpath.js (hosts cadcraft, takeoffcraft in tools/geom2d/sync.mjs) and CivilCraft parking.js + sections.js. Kept inline on purpose: lasso-core.js (import-free, 5 byte copies) and vpclip.js (no imports). Not done: the lib/ synced copies (envir, landscape, wind), the other clusters, vector math, csv cell, esc, uid, download, shell util.js, shell-mount, ui-util, live-state. Was: Partly built (code-shared-10 2026-11-16). lib/geom2d/geom2d.js pointInPolygon (identical to the 18-copy cluster, test against the old text on a half-unit grid) + tools/geom2d/sync.mjs; CivilCraft's 11 inline copies now call it (civilcraft 417/0, the 14 per-feature suites 0 new failures). Not done: the other 7 copies in that cluster and the 9 other point-in-polygon clusters (each needs its host's geom2d copy), vector math (2,088), csv cell, esc, uid, download, shell util.js, shell-mount, ui-util, live-state. Was: tools/perf/quality-utils.mjs counted 6,943 implementations of 24 utility names (21,260 lines): vector math 2,088 (516 distinct bodies in 1,094 files), area 299, point-in-polygon 243 (identical clusters of 17, 12, 9, 8 and 6), bbox 190, lerp 69, clamp 68; text and bytes: esc 198, uid 188, download/saveBlob 163, csv cell 431, base64 59. The shell exports none of these; lib/units is the one shared table that is used everywhere. Change: lib/geom2d (vec, bbox, area, point-in-polygon, lerp, clamp) and a shell util.js (esc, uid, download, csv, base64) synced into the builds like host.js; mechanical replacement guided by the cluster list, with the quality scripts kept as the check so the count only goes down. Also shell-mount.js (a 48-line block identical in seven apps) and ui-util.js (eight variants of one 45 to 76 line file) become synced shell files, and the Studio Live stateCore plus diff and invert hand-copied in three apps and joinFromPage in six bec… BUILT 2026-11-21 (perf-finish-11), lane r2: util, in /lab (a Discord member) only: Shared files with one canonical copy, synced as byte copies into all eight apps: assets/js/ui-util-core.js (makeEl reproducing each app's own el() rules, fillDl, bytes, num, fmt, frame), assets/js/util.js (esc, escXml, csvCell, uid, download), assets/js/shell-mount-core.js (the mount block seven apps had copied), lib/geom2d geom2d.js (pointInRing, signedArea, ringArea) + geom-vec.js (2D/3D vector helpers, affineMul); tools/shell/sync.mjs and tools/geom2d/sync.mjs cover them. 295 helper copies in 135 files replaced only where the syntax tree equals the shared function (tools/perf/util-copies.mjs, scope-checked): test-util-copies 315 / 0 (2,000 seeded inputs a copy, Object.is), browser-ui-util-core 158 same / 0 different, test-shell-mount-core 42 / 0, geom2d 26 / 0; every app's page guard and suite equal to its baseline. Left on purpose: copies that are not the same function (uid schemes stored in files, download helpers that clean names, esc variants, TakeoffCraft csvCell), title-svg.js ("No imports"), ModelCraft io.js (the m3d kernel copy).

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App codeApp shell Built · in the lab 6 – docs/0.9-sessions/perf-wave3/
FixPERF.75 Link to PERF.75Comment on PERF.75 Code: deep clones by JSON round trip (205 sites, some inside merge loops) and 24 timers polling faster than once a second

Partly built (code-shared-11 2026-11-20). The 33 ms presence timers (cadcraft live.js, markupcraft live-ui.js) are now presence-pump.js: a push soon after a pointer, wheel, touch or key event or a view invalidate (at most 30 a second), plus a 250 ms safety net; idle 30 asks a second to about 4 (tools/live-apps-test/test-presence-pump.mjs 16/0). Markup page check: browser-mount live strip section 31/0. countall-ui.js 20 ms worker poll is a waiting queue. JSON clones stay (measured in 0.10: not faster). Not done: hazard-ui animation 33 ms, plc-ui 50 ms, CadCraft live UI in a real page. Was: Measured (code-shared-10 2026-11-16), nothing changed. structuredClone is NOT faster than JSON.parse(JSON.stringify()) on plain objects of this shape (Node 24: 50,000 clones of a 40-point symbol, 420-445 ms JSON, 460-493 ms structuredClone), so the 205 sites are not swapped. takeoffcraft learn.js merge loops are bounded by LEARN_LIMITS (100 symbols, 50 sets, 500 assemblies), a clone per merged item: not a cost. The 33 ms presence timers (cadcraft live.js:763, markupcraft live-ui.js:71) still wait for a dirty-flag design. Was: Perf-relevant sloppiness confirmed by reading the top sites. Clones: 205 JSON.parse(JSON.stringify()) plus 112 clone helpers; takeoffcraft/a Discord member/learn.js clones inside merge loops (11 sites), clipboard.js and dwg-keep.js clone document-sized objects: structuredClone or a cloneDoc that copies only what changes. Timers: cadcraft live.js:763 and markupcraft live-ui.js:71 setInterval(push, 33) build presence and JSON.stringify it 30 times a second while idle; hazard-ui and people-ui animate with setInterval 33; countall-ui waits on a worker with a 20 ms poll; plc-ui 50 ms; 250 to 500 ms pollers elsewhere. Change: event-driven pushes with a dirty flag, requestAnimationFrame for animation, promise-based worker replies; a check that lists any setInterval under 1 s. Also: a console.log in bimcraft fem/frame-push.js:155 inside the solver loop, 12 new RegEx… BUILT 2026-11-21 (perf-finish-11), lane code, in /lab (a Discord member) only: Shared Live presence layer (assets/js/live-presence.js, synced to all eight apps): the 33 ms poll for the whole session became pointer/key events plus a 250 ms safety ask; idle work 61 -> 8 calls in 2 s, identical sends (browser-presence-layer 9 / 0, test-presence 53 / 0); a change made by code with no user event reaches others up to 250 ms later. BimCraft hazard and people playback on requestAnimationFrame at the same pace (15 / 0, 19 / 0); ModelCraft PLC timers only while a controller is attached (26 / 0). tools/perf/interval-lint.mjs: every setInterval under 1 s needs a written reason (75 / 75 allowed, a new one fails). JSON clones kept: structuredClone measured 1.5-2x slower than the JSON round trip at every document size (Node and Chromium).

CadCraftBimCraftModelCraftMarkupCraftTakeoffCraftCivilCraftDetailCraftPartCraft App code Built · in the lab 2 – docs/0.9-sessions/perf-wave3/
FixPERF.76 Link to PERF.76Comment on PERF.76 Code: O(n squared) searches in kernel code (ModelCraft mesh ops, the shared m3d model, CivilCraft LandXML) and render functions that rebuild whole panels

Built (code-shared-11 2026-11-20, with model-part-11 for the kernels). CivilCraft LandXML writer: structures x pipes, pipes x structures and profile points x curves became one index each: 6,000 structures 1,359 ms to 96 ms, 20,000 PVIs 93 to 29 ms, file hash identical (tools/civilcraft-test/bench-quadratic-011.mjs). TakeoffCraft clipboard copy of 20,000 items 1,996 ms to 34 ms, 20,000 marks 1,525 to 86 ms, Live reorder op 765 to 7 ms (tools/takeoffcraft-test/bench-quadratic-011.mjs). Render-function rebuilds are a separate row's work. Was: Not started (code-shared-10 2026-11-16): kernel Sets (modelcraft mesh/ops, m3d model, landxml) and render-function rebuilds wait for a next session. Was: Nested-loop searches with includes/some inside N by N loops: modelcraft mesh/ops.js:421 subdivide (also :471, :820, :915), m3d model.js:693, :778, :1637, :1957 (in both ModelCraft and CadCraft's copy), civilcraft landxml.js:298-322. These are the places a 10x model turns into a 100x wait; the 3D track's numbers (ModelCraft push/pull and undo at 500k faces) land here. Change: Sets and Maps keyed by vertex or id, measured before and after with tools/perf/scale-bench.mjs and the apps3d scripts. Render functions that rebuild and re-query the DOM on every call (196 querySelectorAll and 315 addEventListener inside render functions; takeoffcraft.js sheet list on every sheet switch, shell app-workspace.js, supercadcraft.js, cadcraft renderLayers and renderSelTotals): keyed children and incremental updates, measured on the 2D track's 2,000-sheet set. MODELCRAFT AND THE M3D MODEL BUILT in /lab 2026-11-20 (model-part-11), same machine, results identical by hash: slideRails on a 1,001-vertex loop of a 4 M half-edge mesh 27.1 s to 0.09 s (the open half-edges by head built once), healCollinear on a 6,000-vertex polyline 2.53 s to 0.05 s (vertex map kept in step, edge-face map only after a merge), edgeChain on 6,000 edges 37 ms to 18 ms, insetFaces on 22,500 faces 4.4 s to 2.3 s…

CadCraftModelCraftTakeoffCraftCivilCraft App codeOur engines Built · in the lab 4 CivilCraft landxml.js (civil-11's); the render functions that rebuild whole panels (the 2D apps') docs/0.9-sessions/perf-wave3/
FixPERF.78 Link to PERF.78Comment on PERF.78 Code: dead modules and exports, god functions and cyclomatic hotspots beyond the mains

Partly built (code-shared-11 2026-11-20). Re-ran tools/perf/quality-dead-exports.mjs: 17 orphan modules and about 30 dead exports left, every one with a reader outside the import graph (tests, worker entry points, the cheat-sheet and numerics tools, super-engineer under test-super-core), so nothing deleted. Not done: the bundler dry run (no tool), god functions. Was: Partly built (code-shared-10 2026-11-16). Deleted the stale cadcraft addons/windows/lib/cutlist/cutlist.js (nothing imported it; tools/cutlist WINDOW_FILES updated; windows add-on 93/0). Checked and kept: skin-gpu.js (browser-skin-gpu.mjs test), compute/parity.js (bin/test-compute.mjs, the accuracy register), trusscraft layout.js (accuracy register), partcraft eng-data/eng-units (doors, import map names unverified). Not done: the 32 dead exports, the bundler dry run, god functions. Was: Confirmed dead: cadcraft addons/windows/lib/cutlist/cutlist.js (190 lines, a stale copy nothing imports), addons/trusscraft/lib/layout.js in four apps (tests only), modelcraft anim/skin-gpu.js, compute/parity.js twice, partcraft eng-data and eng-units stubs; 32 dead exports (about 54 KB: partcraft worker solvers, the openfoam runner) plus 26 orphan modules (about 141 KB). Name-level dead code across the 5,020 namespace and dynamic imports needs a bundler dry run (one tree-shake pass per app as a report, nothing shipped bundled). Hotspots: 120 functions over 300 lines and 618 with cyclomatic complexity 40 or more: readFamily 234, writeDwg 769 lines at 214 (plus convert 195, buildModelParts 182), vla-host get 207, validateItem 194, buildSite3D 190, dxf entityFrom0 187 and writeDxf 159, pdf-write writeMarkedUp 182, writeCivilIfc 702 lines, model-ui mountModel 1,804 lines, res-ui 1,407, shell app-panels 1,742 and app-settings 1,521. Change: table-driven dispatch for the entity switches, one module per panel section, delete the dead files; each behind the existing tests. BUILT 2026-11-21 (perf-finish-11), lane r2: all app lanes, in /lab (a Discord member) only: Table-driven switches and one module per panel section, worst first per app: CadCraft DXF entity switch a table (readDxf identical on 85 texts), Properties 837 -> 343 lines in 7 modules; BimCraft dwg-compile entity switch a handler table (identical on 410 drawings), model-ui 1,903 -> 434 and res-ui 1,593 -> 404 lines in 10 section modules each; CivilCraft IFC writer 753 -> 166 and 3D builder 333 -> 91 (37/37 + 3/3 IFC, 66/66 scenes identical); DetailCraft Properties one module per section, two type switches tables (175 build() calls identical); MarkupCraft 72-case act switch a table, writeMarkedUp one writer per kind (3/3 PDFs byte-identical); TakeoffCraft estimateSheets one builder per sheet (8/8 workbooks identical); ModelCraft 60-case act switch a table, Info panel nine sections; PartCraft run() two command tables, swmacro switch a map (16 runs byte-identical). Dead-exports report re-run (33 exports, 14 orphans, none safe to delete). Still large: ModelCraft readGltf and openRenderDialog, PartCraft step-exact, BimCraft views-ui and render-ui.

CadCraftBimCraftModelCraftCivilCraftDetailCraftPartCraft App code Built · in the lab 4 – docs/0.9-sessions/perf-wave3/
Suggest an item

Anyone can send one; no account and no name needed. The team reads each idea, and the ones we take on appear on this page. Please leave out web addresses.

Top