Skip to content

perf(cli): accelerate dynamic sketch rebuilds - #191

Merged
zackees merged 1 commit into
mainfrom
perf/issue-190-dynamic-edit
Jul 12, 2026
Merged

zackees merged 1 commit into
mainfrom
perf/issue-190-dynamic-edit

Conversation

@zackees

@zackees zackees commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • parallelize content-authoritative FastLED/toolchain fingerprints and memoize them safely in long-lived watch sessions
  • compile sketches with cached em++ --cflags + direct Clang, while retaining an automatic em++ fallback
  • use a version/ABI/mode-gated Emscripten 4.0.19 quick side-link plan with automatic driver fallback
  • cache installed-toolchain discovery, avoid unchanged .emscripten writes, skip unchanged runtime output copies, and expose phase timings

Performance

Reference Windows machine, external Blink sketch, --just-compile --no-app --link-mode dynamic, warm runtime cache:

Scenario Before After Improvement
Warm no-op 1.46s 0.34s 76.7% faster
Sketch edit median 3.62s 0.62s 82.9% faster

Final fresh-edit samples: 0.62s, 0.58s, 0.62s, 0.64s, 0.70s.

For the same object, the direct side-link output and em++ -sSIDE_MODULE=1 output were both 48,721 bytes and had identical SHA-256 6938E84F169E2371BBB32CF77DF4AF775947124353EE9BD38EA38D28DF4906EB.

Validation

  • bash lint
  • bash test (183 Rust tests plus Python/package tests)
  • real static-mode quick WASM build
  • real dynamic-mode no-op and repeated fresh sketch-edit benchmarks
  • direct side-link versus em++ byte-equivalence check
  • focused cache, watcher invalidation, fallback gating, unchanged-output, and same-size/restored-mtime tests

Closes #190

@zackees
zackees merged commit bddaf07 into main Jul 12, 2026
22 checks passed
@zackees
zackees deleted the perf/issue-190-dynamic-edit branch July 12, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(cli): reduce dynamic sketch-edit latency from 3.62s toward 1.6s

1 participant