perf(tailwind): optimize rendering pipeline with caching#2970
Open
Ray0907 wants to merge 1 commit intoresend:canaryfrom
Open
perf(tailwind): optimize rendering pipeline with caching#2970Ray0907 wants to merge 1 commit intoresend:canaryfrom
Ray0907 wants to merge 1 commit intoresend:canaryfrom
Conversation
…m improvements - Batch class collection and deduplicate before single addUtilities call (N compiler.build → 1) - Cache parsed CSS AST in setup-tailwind with clone-on-read to avoid redundant parsing - Walk rule.prelude instead of entire rule in extractRulesPerClass with early exit for non-matching rules - Add LRU eviction (max 50) to useSuspensedPromise to prevent unbounded memory growth
|
@Ray0907 is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimize the Tailwind rendering pipeline without changing
public API.
Setdedup, calladdUtilitiesonce (Ncompiler.build()→ 1)
clone()on read to skip redundantparse()callsrule.preludeinstead of entire rule subtree, early exit for non-matching rulesuseSuspensedPromiseto cap memory on long-runningservers
Summary by cubic
Optimized the Tailwind rendering pipeline to remove redundant builds and CSS parsing, and added an LRU cache for suspended promises to reduce memory on long-running servers. No public API changes.
Written for commit d843955. Summary will update on new commits.