Repository navigation
Commit e9ea857
perf(web): keep the per-key event check off the regex engine
The server spread walk and the client's assignProp test every key of a
spread for `onXxx`. A `/^on[A-Z]/` test there regressed the
spread-static-tail renderToString benches by 5-7% against the
`startsWith("on")` it replaced. Gate on `startsWith("on")` and compare one
char code, so a key not starting with `on` costs what it did before.
`ssrAttribute` takes strings first, ahead of the new function branch, and
h tests a prop's type before its name. Behavior is unchanged.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>1 parent b772e77 commit e9ea857
4 files changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2580 | 2580 | | |
2581 | 2581 | | |
2582 | 2582 | | |
| 2583 | + | |
2583 | 2584 | | |
2584 | 2585 | | |
2585 | | - | |
2586 | | - | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
2587 | 2590 | | |
2588 | 2591 | | |
2589 | 2592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
237 | 238 | | |
238 | | - | |
| 239 | + | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4618 | 4618 | | |
4619 | 4619 | | |
4620 | 4620 | | |
| 4621 | + | |
4621 | 4622 | | |
4622 | 4623 | | |
4623 | 4624 | | |
| |||
0 commit comments