Features
- analyzer: read calls with their arguments, including Carbon helper functions
- analyzer: read stores a context hands on
- analyzer: read writes that only run under a
$:condition - analyzer: read context keys Carbon imports as constants
Performance
- specializer: cut repeat walks, stat calls, and CSS parses
The shared analysis behind optimizeCss({ propAware: true }) and optimizeComponents now follows more of Carbon’s own wiring: helper calls (resolveValidationVisibility, resolveTabsSize, …), writable stores passed through context, $: assignments guarded by if, and getContext/setContext keys imported as constants. Default optimizeCss() (no propAware) is unchanged.
optimizeCss({ propAware: true }) — smaller CSS when unused variants depended on those paths:
| App | v0.11.52 | v0.11.53 | Δ |
|---|---|---|---|
| Admin dashboard | 112.57 kB | 95.57 kB | −15.1% |
| Signup wizard | 76.62 kB | 61.15 kB | −20.2% |
| Docs site | 65.00 kB | 57.81 kB | −11.1% |
| Product catalog | 108.19 kB | 83.19 kB | −23.1% |
| Example | v0.11.52 | v0.11.53 | Δ |
|---|---|---|---|
| vite-matrix@svelte-4 | 175.26 kB | 131.78 kB | −24.8% |
| vite-matrix@svelte-5 | 173.91 kB | 130.71 kB | −24.8% |
| sveltekit-matrix@svelte-5 | 173.91 kB | 130.71 kB | −24.8% |
| rollup / rolldown / webpack | 29.64 kB | 23.72 kB | −20.0% |
| rspack | 33.28 kB | 27.28 kB | −18.0% |
| astro | 29.55 kB | 23.62 kB | −20.1% |
optimizeComponents() — less JS from the same reads (prop-aware CSS size matches the table above when both run):
| App | v0.11.52 | v0.11.53 | Δ |
|---|---|---|---|
| Admin dashboard | 187.30 kB | 181.45 kB | −3.1% |
| Signup wizard | 162.84 kB | 150.10 kB | −7.8% |
| Docs site | 132.73 kB | 132.55 kB | −0.1% |
| Product catalog | 201.92 kB | 197.30 kB | −2.3% |
Build cost: the specializer does fewer AST walks, stats Carbon helper modules once per analysis, and skips <style> when parsing for rewrites.