Skip to content

Commit 3c4ecba

Browse files
committed
docs: sync patches with upstream PRs and add PR status
- Update external-reference-resolver-cache.patch with O(1) hash set lookup - Update inline-lexer-regex-cache.patch to use ExternalReferenceResolver::isSupportedScheme() - Update guides-cli-container-cache.patch with graceful fallback for uncacheable containers - Update guides-cli-symfony8-compat.patch with backwards-compatible method_exists() - Add Upstream Pull Requests section to performance report - Link to PRs #1287, #1288, #1289, #1290, #1291
1 parent 84e8b6a commit 3c4ecba

5 files changed

Lines changed: 565 additions & 51 deletions

docs/index.html

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,19 +1355,85 @@ <h4 style="margin-bottom: 0.5rem;">Prerequisites</h4>
13551355
</p>
13561356
</div>
13571357

1358+
<!-- Upstream PR Status -->
1359+
<div class="card">
1360+
<h2>Upstream Pull Requests</h2>
1361+
<p style="color: var(--text-muted); margin-bottom: 1rem;">
1362+
Performance patches submitted to <a href="https://github.com/phpDocumentor/guides">phpDocumentor/guides</a> monorepo for upstream integration.
1363+
</p>
1364+
1365+
<table class="comparison-table">
1366+
<thead>
1367+
<tr>
1368+
<th>PR</th>
1369+
<th>Package</th>
1370+
<th>Description</th>
1371+
<th>Status</th>
1372+
</tr>
1373+
</thead>
1374+
<tbody>
1375+
<tr>
1376+
<td><a href="https://github.com/phpDocumentor/guides/pull/1287">#1287</a></td>
1377+
<td><code>guides</code></td>
1378+
<td>Caching improvements (SluggerAnchorNormalizer, TwigTemplateRenderer, PreNodeRendererFactory, ProjectNode, TwigEnvironment, RenderContext, DocumentNameResolver, UrlGenerator, ExternalReferenceResolver hash set)</td>
1379+
<td><span class="badge badge-success">Ready</span></td>
1380+
</tr>
1381+
<tr>
1382+
<td><a href="https://github.com/phpDocumentor/guides/pull/1288">#1288</a></td>
1383+
<td><code>guides-restructured-text</code></td>
1384+
<td>RST parsing optimizations (InlineParser lexer reuse, LineChecker, Buffer, InlineLexer O(1) scheme lookup, FieldListRule, DirectiveRule, EnumeratedListRule, LinkRule, GridTableRule, SimpleTableRule)</td>
1385+
<td><span class="badge badge-success">Ready</span></td>
1386+
</tr>
1387+
<tr>
1388+
<td><a href="https://github.com/phpDocumentor/guides/pull/1289">#1289</a></td>
1389+
<td><code>guides-cli</code></td>
1390+
<td>DI container caching with graceful fallback for uncacheable containers</td>
1391+
<td><span class="badge badge-success">Ready</span></td>
1392+
</tr>
1393+
<tr>
1394+
<td><a href="https://github.com/phpDocumentor/guides/pull/1290">#1290</a></td>
1395+
<td><code>guides</code></td>
1396+
<td>Refactoring: Use object identity for DocumentEntryNode comparisons (enables caching)</td>
1397+
<td><span class="badge badge-success">Ready</span></td>
1398+
</tr>
1399+
<tr>
1400+
<td><a href="https://github.com/phpDocumentor/guides/pull/1291">#1291</a></td>
1401+
<td><code>guides-cli</code></td>
1402+
<td>Symfony 8 compatibility: Replace deprecated <code>add()</code> with <code>addCommand()</code></td>
1403+
<td><span class="badge badge-success">Ready</span></td>
1404+
</tr>
1405+
</tbody>
1406+
</table>
1407+
1408+
<h3 style="margin-top: 1.5rem;">Key Optimizations</h3>
1409+
<ul style="margin: 1rem 0; padding-left: 1.5rem;">
1410+
<li><strong>O(1) URI scheme lookup:</strong> Replaced 5600+ character regex with hash set lookup (~6x faster)</li>
1411+
<li><strong>Instance caching:</strong> Reuse parser instances instead of repeated instantiation</li>
1412+
<li><strong>Result caching:</strong> Cache expensive computations (URL resolution, slugger, Twig globals)</li>
1413+
<li><strong>DI container caching:</strong> Cache compiled Symfony container for faster startup</li>
1414+
<li><strong>Object identity:</strong> Use identity comparison for cached DocumentEntryNode lookups</li>
1415+
</ul>
1416+
1417+
<p style="color: var(--text-muted); margin-top: 1rem; font-size: 0.9rem;">
1418+
<strong>Note:</strong> All PRs target PHP 8.1+ and maintain backwards compatibility. The patches in this repository
1419+
will be removed once the upstream PRs are merged and released.
1420+
</p>
1421+
</div>
1422+
13581423
<!-- References -->
13591424
<div class="card">
13601425
<h2>References</h2>
13611426
<ul style="margin: 0; padding-left: 1.5rem;">
13621427
<li><a href="https://github.com/TYPO3-Documentation/render-guides/pull/1143">PR #1143</a> &mdash; Original performance optimization proposal and discussion</li>
13631428
<li><a href="https://github.com/CybotTM/render-guides/tree/feature/php-8.5-only">Feature Branch</a> &mdash; Source code for this implementation</li>
1429+
<li><a href="https://github.com/phpDocumentor/guides/pulls?q=is%3Apr+author%3ACybotTM">Upstream PRs</a> &mdash; Performance patches submitted to phpDocumentor/guides</li>
13641430
</ul>
13651431
</div>
13661432
</main>
13671433

13681434
<footer>
13691435
<p>
1370-
Generated on 2026-01-09 |
1436+
Generated on 2026-01-22 |
13711437
<a href="https://github.com/TYPO3-Documentation/render-guides">TYPO3 Render Guides</a> |
13721438
Branch: <code>feature/php-8.5-only</code>
13731439
</p>

0 commit comments

Comments
 (0)