Skip to content

Conversation

Copy link

Copilot AI commented Jan 6, 2026

Adds benchmarking infrastructure for the renderer extension matching logic introduced in #291 and #292, measuring the performance characteristics of the extension sorting and matching operations.

Changes

  • benchmarks/RendererMatchingBench.php - Benchmark suite measuring:

    • uksort() overhead for sorting extensions by length (~17.5 μs per operation)
    • str_ends_with() performance for extension matching (~200 ns per operation)
    • End-to-end comparison of sorted vs unsorted matching
  • benchmarks/README.md - Documentation covering execution, interpretation, and performance trade-offs

Usage

php benchmarks/RendererMatchingBench.php

Sample output:

1. Extension Sorting Performance (uksort)
   Per operation: 17.5174 μs

2. Extension Matching Performance (str_ends_with)
   'template.blade.php' -> 'blade.php': 201.17 ns/op

3. Overall Matching Performance (sorted vs unsorted)
   Sorted:   1.4706 μs/op
   Unsorted: 0.5746 μs/op

The sorting overhead is acceptable since it occurs once during initialization, while the matching operation remains fast in the hot path.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 6, 2026 19:42
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (40a5e9e) to head (4186a47).

Additional details and impacted files
@@                   Coverage Diff                    @@
##             289-double-extensions     #293   +/-   ##
========================================================
  Coverage                    99.14%   99.14%           
  Complexity                     311      311           
========================================================
  Files                           19       19           
  Lines                          816      816           
========================================================
  Hits                           809      809           
  Misses                           7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI and others added 2 commits January 6, 2026 19:43
Copy link
Author

Copilot AI commented Jan 6, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/azjezz/psl/zipball/15153a64c9824335ce11654522e7d88de762d39e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/e7ef9e012667327516c24e5fad9903a3bc91389d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/clue/reactphp-term/zipball/00f297dc597eaee2ebf98af8f27cca5d21d60fa3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/clue/reactphp-utf8/zipball/d5cd04d39cb5457aa5df830b7c4b301d2694217e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/jolicode/php-os-helper/zipball/e71596ae67d477fe214a5908f5522b9e4d19fd37
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/c62d517ef5ac2d347dd9b3d02c1cc16c0f1091e2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/revoltphp/event-loop/zipball/b6fc06dce8e9b523c9946138fa5e62181934f91c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/string/zipball/d50e862cb0a0e0886f73ca1f31b865efbb795003
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/webmozarts/glob/zipball/8a2842112d6916e61e0e15e316465b611f3abc17
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/arrays/zipball/8efada90e4fd540b3da476779bc1b7bd9319b62f
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/cache/zipball/1f0fe8fac81632aa86b8feea73f2c7f11d7405d2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/definitions/zipball/efba764905b89b549e2b5a7a72f50a79b3d5b0cc
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/di/zipball/09545283f29b6311805eca870bf01d2603704c63
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/files/zipball/465650fd9e4295669f42ab7e9fec2386700540a7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/friendly-exception/zipball/c6c36fd60a0b4f1514882d2ce8395f54352ec967
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/html/zipball/c9ebbac355d1e8a626c0e17e3e467b701f672aa1
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/json/zipball/6af88ed2c653f4b6cbe3ea9114e4aebc5a463c80
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/psr-dummy-provider/zipball/658283e87ffe10c81092552a25ad9770788f0346
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/strings/zipball/9bc7fea56374619cccd4587848029fe97f98bb33
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/yiisoft/test-support/zipball/2be91b4db0239c00e7502fb6dc9f4ded0ea18f06
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ZVVCUN /usr/bin/composer install --no-interaction (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix template file searching for double extensions Add performance benchmark for renderer extension matching Jan 6, 2026
Copilot AI requested a review from samdark January 6, 2026 19:45
@samdark samdark closed this Jan 6, 2026
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