From daab9aedd13c54b28ef2b12662fe8a6056347def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Bokisch?= Date: Thu, 21 May 2026 13:37:32 +0200 Subject: [PATCH] docs: align styler page with measured 2.6.x numbers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stale claims fixed: - bundle: docs said "~10.3 KB gzipped" everywhere; fresh build is 4.82 KB gzipped / 13.65 KB minified / 33.97 KB unminified - "45% smaller than sc / 40% smaller than emotion" headline removed; the table now shows raw KB so readers compute their own - micro-benchmark table (css() creation 25.2M, "2.8–1034x faster", etc.) removed — those numbers came from an older vitest-bench iteration that's no longer the canonical suite Replaced with what's actually measured today: - Bundle-size table with fresh build numbers + competitor snapshot - Competitive bench (css-perf.bench.tsx, 3-run medians, bun 1.3.13 / react 19.2.6, equivalent work — sc wrapped in ServerStyleSheet so all three serialize CSS): styler 2.14× emotion on ssr-static, 1.41× on ssr-dynamic, 3.32× sc on csr-many, all 3 within ~1% on csr-mount/update - Helper-level microbench (perf-audit-bench.tsx): _staticResolved +149% on nested-static, hashUpdate +46% on long CSS, HTML_PROPS +19% on lookup mix - "CI-gated perf" framing — bench workflow fails on >10% regression vs main on the same runner (caught and forced revert of one recent normalizeCSS slice-batch change) Other pages: bundle-size mentions updated everywhere they reference styler (index, connectors, core, api). Co-Authored-By: Claude Opus 4.7 --- content/docs/connectors/index.mdx | 6 +- content/docs/core/index.mdx | 2 +- content/docs/index.mdx | 2 +- content/docs/styler/api.mdx | 2 +- content/docs/styler/index.mdx | 111 ++++++++++++++++-------------- 5 files changed, 67 insertions(+), 56 deletions(-) diff --git a/content/docs/connectors/index.mdx b/content/docs/connectors/index.mdx index e571c7d..a43256e 100644 --- a/content/docs/connectors/index.mdx +++ b/content/docs/connectors/index.mdx @@ -35,7 +35,7 @@ Every connector exports these functions: ### connector-styler (Recommended) -Uses the built-in `@vitus-labs/styler` engine (~10.3 KB gzipped) — purpose-built for the UI system. +Uses the built-in `@vitus-labs/styler` engine (4.82 KB gzipped) — purpose-built for the UI system. ```package-install @vitus-labs/connector-styler @@ -158,11 +158,13 @@ init({ css: engineCss, styled: engineStyled, provider: engineProvider }) | Connector | Platform | Size (gzipped) | When to Use | |-----------|----------|----------------|-------------| -| **connector-styler** | Web | ~10.3 KB (engine) + 193 B (adapter) | New projects, best performance | +| **connector-styler** | Web | 4.82 KB (engine) + 193 B (adapter) | New projects; built-in engine, no external dep | | **connector-styled-components** | Web | ~12 KB (engine) + 186 B (adapter) | Existing styled-components codebase | | **connector-emotion** | Web | ~11 KB (engine) + 1.28 KB (adapter) | Existing Emotion codebase | | **[connector-native](/docs/connectors/native)** | React Native | 2.74 KB | React Native applications | +Per-scenario `ops/sec` numbers comparing all three engines via the in-repo bench live on the [styler page](/docs/styler#competitive-bench-render-to-string--csr). + ### Web Connector Compatibility All web connectors support: diff --git a/content/docs/core/index.mdx b/content/docs/core/index.mdx index 0345b63..c0d81f9 100644 --- a/content/docs/core/index.mdx +++ b/content/docs/core/index.mdx @@ -243,7 +243,7 @@ Three official connectors are available: | Connector | Package | Size (gzipped) | Notes | |-----------|---------|---------------:|-------| -| Styler | `@vitus-labs/connector-styler` | ~10.3 KB engine + 193 B adapter | Built-in engine, recommended | +| Styler | `@vitus-labs/connector-styler` | 4.82 KB engine + 193 B adapter | Built-in engine, recommended | | Emotion | `@vitus-labs/connector-emotion` | ~11 KB engine + 1.28 KB adapter | Adapter matching styled-components composition | | styled-components | `@vitus-labs/connector-styled-components` | ~12 KB engine + 186 B adapter | Direct pass-through | diff --git a/content/docs/index.mdx b/content/docs/index.mdx index b4b176f..bc39dc1 100644 --- a/content/docs/index.mdx +++ b/content/docs/index.mdx @@ -12,7 +12,7 @@ Components, styling, layout, hooks, and theming for React applications. | Package | Description | |---------|-------------| | [@vitus-labs/core](/docs/core) | Configuration, initialization, and shared utilities | -| [@vitus-labs/styler](/docs/styler) | High-performance CSS-in-JS engine (~10.3 KB gzipped) | +| [@vitus-labs/styler](/docs/styler) | CSS-in-JS engine — 4.82 KB gzipped, React 19 SSR via `