Skip to content

perf(core): skip redundant shortcut variant matching#5233

Merged
zyyv merged 1 commit into
unocss:mainfrom
TheAlexLichter:perf/core-skip-shortcut-variant-rematch
Jun 25, 2026
Merged

perf(core): skip redundant shortcut variant matching#5233
zyyv merged 1 commit into
unocss:mainfrom
TheAlexLichter:perf/core-skip-shortcut-variant-rematch

Conversation

@TheAlexLichter

Copy link
Copy Markdown
Contributor

This PR avoids rerunning top-level variant matching during shortcut lookup.

Becaus parseToken() already calls matchVariants() before expandShortcut(), the branch passes a flag to skip the redundant second matchVariants() call for that top-level shortcut miss path.

Recursive shortcut expansion still uses the existing variant matching behavior, so variant-prefixed nested shortcuts continue to work.

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5c44ce3
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/6a3c06d9f449b40008b7772f
😎 Deploy Preview https://deploy-preview-5233--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 5c44ce3

@zyyv zyyv added this pull request to the merge queue Jun 25, 2026
Merged via the queue into unocss:main with commit 1fd926a Jun 25, 2026
11 checks passed
@TheAlexLichter TheAlexLichter deleted the perf/core-skip-shortcut-variant-rematch branch June 25, 2026 04:47
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.

2 participants