Problem/Motivation
#3496369: Multiple load path aliases without the preload cache multiple loads path aliases when several individual path aliases are discovered in different fibers.
This happens via the existing placeholder fiber rendering, and also in #3518668: Use Fibers for rendering views rows.
When testing with those two issues, there are still a couple of places that the path alias preloading doesn't pick in. At the moment it looks mostly like local tasks (where several path aliases get looked up within a single block), and entity reference field formatters.
Local tasks relies on #theme 'local_tasks' which doesn't provide an obvious place to intervene with Fibers. We can generically render children in Fibers though, which then covers any similar situation.
Steps to reproduce
Proposed resolution
Remaining tasks
We might want to refactor local tasks and similar places to use Fibers explicitly, rather than handling it implicitly for render children, so that the logic only runs where it's needed. However at least until that's possible, having a working implementation here allows different scenarios to be tested.
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3496835
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
catchSo far doesn't achieve what we want because a lot of children get rendered in theme templates when #theme is set, not via Renderer directly.
Comment #4
catchThis is working as demonstrated by the profiling/testing in #3496369: Multiple load path aliases without the preload cache.
Comment #5
catchPostponing this on #3518179: Renderer::executeInRenderContext() needs to handle nested calls and suspended fibers which changes the same code. I think that overall we probably don't want to do this, and instead should continue with adding #lazy_builder/#create_placeholder to more things. However #3496369: Multiple load path aliases without the preload cache provides an easy way to test the effectiveness of this, so it might be worth one more try once things are a bit further along.
Comment #6
catchActually postponed on #2511330: Deprecate RendererInterface::render()'s sole $is_root_call parameter.
Rebased on top of that to check something.
Comment #7
catchThis mostly helps when rendering tabs, but because we don't have admin performance tests, it's not picked up in test coverage yet.
I rebased the branch on top of #2511330: Deprecate RendererInterface::render()'s sole $is_root_call parameter so that it's easier to test alongside other issues later.
Comment #8
catchUpdated the issue summary.