Skip to content

feat(blog): add "Look it up once" essay - #29

Open
Adebesin-Cell wants to merge 1 commit into
mainfrom
blog/panda-css-runtime-cache
Open

feat(blog): add "Look it up once" essay#29
Adebesin-Cell wants to merge 1 commit into
mainfrom
blog/panda-css-runtime-cache

Conversation

@Adebesin-Cell

Copy link
Copy Markdown
Owner

🔗 Linked issue

N/A. New blog post, no tracked issue.

🧭 Context

Part two of the Panda CSS series, following "Build once, at build time." That one covered build-time extraction. This one goes under the hood on the runtime side: the css() call that still runs at render (and during SSR) for styles you compose from props. It used to redo its merge work on every render. Sage's memoization work on the v2 branch fixed that, and this post walks through it.

The work started from Jan Nicklas (next-yak) benchmarking css-in-js engines and flagging that Panda's runtime was slower than it should be. He gets the credit in the post.

📚 Description

Adds a new post, content/blog/look-it-up-once.md, plus its cover at public/images/blog/look-it-up-once/cover.svg.

What's in it:

  • The runtime css() path, and why it exists even though most styles are extracted at build time.
  • The memo() cache that keyed on JSON.stringify on every call, and the flat-hash fast path that replaced it (~30-40% faster in the SSR benchmark).
  • The wrapper-chain case: forwarding css through props rebuilds the array every render, so it now keys on object identity through a trie of WeakMaps. ~4x for a three-level chain, 3x for six, with plain css() untouched. Plus the follow-up that keeps inline styles off the trie so they don't regress.

Notes for review:

  • Marked draft: true.
  • Cover reuses the part-one ecosystem layout (Panda + Rust + Oxc + TypeScript) with a different tagline, so the series reads as one set.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lope Ready Ready Preview Aug 18, 2026 7:11pm

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.

1 participant