-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: improve runtime performance #1986
Conversation
🦋 Changeset detectedLatest commit: 1db635f The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Those improvements in percentage look a bit off. Imho it should be 66.97% faster for mounting and 46.67% for updating ?! |
feffb13
to
9c9555f
Compare
0dedf1a
to
1db635f
Compare
Closes #1982
📝 Description
Improve the performance of the runtime transform functions by caching their results (css, cva, sva, recipe/slot recipe,
patterns)
since Panda has to transform style objects to classes (
{ backgroundColor: "red.300" }
->bg_red
, it will always have a little bit of overhead vs just writing the final classes, caching those reduce the time spent on it.💣 Is this a breaking change (Yes/No):
no
📝 Additional Information
if you're using anything that can pre-render to HTML (Astro, RSC, etc) you can avoid this issue entirely by automatically inlining classes at build-time, without ever needing those runtime functions