Repository navigation
Commit 50df18d
perf: skip redundant work in
* perf(#10617): skip redundant work in `RouteCollection::create()`
Run the placeholder `str_ireplace` loop only when the route key contains
`:`, and call `helper('array')` only on the first `create()` per
collection. The route table output is unchanged.
Route table build, PHP 8.3, OPcache on, median of 7 runs:
100 routes 203 -> 168 µs, 1000 routes 2044 -> 1680 µs (~18%).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Added changelog
* Update user_guide_src/source/changelogs/v4.8.0.rst
Co-authored-by: Michal Sniatala <michal@sniatala.pl>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Michal Sniatala <michal@sniatala.pl>RouteCollection::create() (#10656)1 parent 7326b53 commit 50df18d
3 files changed
Lines changed: 60 additions & 3 deletions
File tree
- system/Router
- tests/system/Router
- user_guide_src/source/changelogs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
| |||
1399 | 1404 | | |
1400 | 1405 | | |
1401 | 1406 | | |
1402 | | - | |
1403 | | - | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1404 | 1412 | | |
1405 | 1413 | | |
1406 | 1414 | | |
| |||
1417 | 1425 | | |
1418 | 1426 | | |
1419 | 1427 | | |
1420 | | - | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1421 | 1433 | | |
1422 | 1434 | | |
1423 | 1435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
251 | 295 | | |
252 | 296 | | |
253 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| |||
0 commit comments