You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Perf: slice run <dir> re-bundles on every invocation (SvelteKit workload: 160 ms vs Node 117 ms, Deno 70 ms, Bun 56 ms) #63
Timed each command 10 times after 2 warm-ups on tests/frameworks/04-sveltekit-edge-ssr (after bun install and bun run build), wall clock from a Python subprocess.run, median reported.
slice run tests/frameworks/04-sveltekit-edge-ssr # source mode
slice pack tests/frameworks/04-sveltekit-edge-ssr out.cas
slice run out.cas
node tests/frameworks/04-sveltekit-edge-ssr/src/index.ts
bun run tests/frameworks/04-sveltekit-edge-ssr/src/index.ts
deno run -A tests/frameworks/04-sveltekit-edge-ssr/src/index.ts
Result (median ms)
Command
ms
slice run <dir> (first batch)
159.9
slice run <dir> (second batch, nothing changed)
159.5
slice pack <dir> out.cas
145.7
slice run out.cas
36.7
node src/index.ts
117.4
deno run -A src/index.ts
70.1
bun run src/index.ts
56.2
slice run <dir> costs about pack + run out.cas every time and is identical on the second batch, so nothing is cached between invocations. I found no cache directory or mtime check in crates/slice-cli/src/commands/run.rs.
Across all 33 workloads in the harness run, source mode is faster than Node on 32, faster than Deno on 28 and faster than Bun on 2; the packed .cas is faster than Node and Deno on 33 and faster than Bun on 25. This SvelteKit workload is the one case where a Slice mode is slower than all three other runtimes.
Suggestion
Cache the packed result of slice run <dir|file> keyed by the content hashes the CAS builder already computes (plus the Slice version), and reuse it when nothing changed. That would bring the edit-run loop close to the .cas number (37 ms here) without asking users to run slice pack by hand.
Activity
siktec-lab commentedon Nov 11, 2026
Fixed in PR #65 (
v0.10.9) alongside #49:-c/--check(slice check),-e/--eval,-p/--print,-v/-V/--version, stdin (-),process.argvscript arguments, and exit code propagation.