• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICanBoogie / Routing / 38226059786
98%
master: 99%

Build:
Build:
LAST BUILD BRANCH: 7.0
DEFAULT BRANCH: master
Ran 12 Oct 2026 08:50AM UTC
Jobs 1
Files 48
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Oct 2026 08:50AM UTC coverage: 97.695% (+0.6%) from 97.143%
38226059786

push

github

olvlvl
PERF04: Add RouteProvider\Compiled

Under PHP-FPM nothing survives between requests, so each request loads the
route table (hydrating every Route and Pattern through __set_state()) and
Memoize rebuilds its indexes. Compiled does that work once, at build time.

Compiled decorates a provider and compiles it into plain arrays: the routes,
stored once in declaration order, and indexes that refer to them by position
(by_id, by_action, the static path map and the chunked regexes of PERF01 and
PERF03). The inner provider is not kept. It implements __set_state(), like
Mutable and Immutable, so it can be exported with var_export() and used in
place of the provider as a configuration value. OPcache shares the arrays
between requests, and a Route is created only when it is needed.

Request cost, exported file loaded through OPcache, one lookup (µs):

| routes | include + Memoize, static | Compiled, static | include + Memoize, dynamic | Compiled, dynamic |
|-------:|--------------------------:|-----------------:|---------------------------:|------------------:|
|     10 |                       6.6 |              1.0 |                        8.0 |               1.4 |
|    100 |                        58 |              1.0 |                         65 |               1.6 |
|  1,000 |                       660 |              1.1 |                        730 |               6.0 |

In-process lookups are unchanged (0.4 µs static, 5 µs dynamic at 1,000
routes) and generate_url() through Compiled stays flat at about 0.6 µs.
Building a Compiled from 1,000 routes takes about 0.5 ms for static routes and
2.8 ms with dynamic routes; it is paid once, when the application is warmed up.

- Add RouteProviderTestCase, a contract suite that every provider can extend.
  It runs the same ByUri, ById, ByAction and ByIdOrAction cases against the
  provider and against an exported and imported copy. CompiledTest extends it,
  and also checks that Compiled stores every property of Rout... (continued)

109 of 109 new or added lines in 1 file covered. (100.0%)

551 of 564 relevant lines covered (97.7%)

13.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 38226059786.1 12 Oct 2026 08:50AM UTC 48
97.7
GitHub Action Run
Source Files on build 38226059786
  • Tree
  • List 48
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 110554dc on github
  • Prev Build on 7.0 (#38224858173)
  • Next Build on 7.0 (#38382743578)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc