Skip to content

perf: add conditional rule CodSpeed benchmark#1271

Merged
hardfist merged 1 commit into
masterfrom
perf/conditional-rule-codspeed-bench
Jun 8, 2026
Merged

perf: add conditional rule CodSpeed benchmark#1271
hardfist merged 1 commit into
masterfrom
perf/conditional-rule-codspeed-bench

Conversation

@hardfist

@hardfist hardfist commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a CodSpeed benchmark fixture for long runs of adjacent conditional rules.

This introduces stylesheet/transform/conditional-run, which generates repeated adjacent @media, @supports, and @container blocks. The benchmark is intended to establish a baseline before applying the minification optimization in the follow-up PR.

Validation

  • cargo check --benches

@codspeed-hq

codspeed-hq Bot commented Jun 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks
🆕 2 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 stylesheet/parse[conditional-run] N/A 10.5 ms N/A
🆕 stylesheet/transform[conditional-run] N/A 276.2 ms N/A

Comparing perf/conditional-rule-codspeed-bench (504c3ed) with master (a55b05d)

Open in CodSpeed

@kdy1

kdy1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

I think this PR is good to go as it shows the performance difference, although Codspeed UI does not support this case.

ref: #1263

276.2 ms vs 13.9 ms

image

@hardfist hardfist marked this pull request as ready for review June 8, 2026 13:17
@hardfist

hardfist commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@hardfist hardfist requested a review from devongovett June 8, 2026 14:01
@hardfist hardfist merged commit 0f44690 into master Jun 8, 2026
5 checks passed
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.

3 participants