Skip to content

fix(view): improve slot rendering#2076

Merged
brendt merged 9 commits into3.xfrom
fix-slot-rendering
Mar 27, 2026
Merged

fix(view): improve slot rendering#2076
brendt merged 9 commits into3.xfrom
fix-slot-rendering

Conversation

@brendt
Copy link
Copy Markdown
Member

@brendt brendt commented Mar 26, 2026

This PR moves from regex based slot rendering to to AST, and then does some cleanup so that we can combine two AST-parse steps into one.

Because of AST-based slot rendering, we can now detect wether a named slot lives inside a component, thus meaning it's a named slot for that component and should be compiled differently. This closes #2071

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Benchmark Results

Comparison of fix-slot-rendering against 3.x (32f58856439e50ebd8abe13fa7449ac841fb2ea7).

Open to see the benchmark results
Benchmark Set Mem. Peak Time Variability
DiscoveryScanBench(benchFullDiscoveryScan) - 23.786mb +0.06% 15.072ms -10.95% ±2.15% +113.22%
ViewRenderBench(benchViewComponent) - 55.282mb +24.55% 1.401ms +5.13% ±2.61% +51.58%

Generated by phpbench against commit 70cb99c

@innocenzi innocenzi changed the title fix(view): improved slot rendering fix(view): improve slot rendering Mar 26, 2026
@brendt brendt merged commit 0c4e165 into 3.x Mar 27, 2026
76 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.

Incorrect Slot Rendering in Nested Components

1 participant