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

Command icon 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

catch created an issue. See original summary.

catch’s picture

So 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.

catch’s picture

Status: Active » Needs work

This is working as demonstrated by the profiling/testing in #3496369: Multiple load path aliases without the preload cache.

catch’s picture

Title: Render children in fibers » [PP-2] Render children in fibers
Status: Needs work » Postponed
Related issues: +#3518179: Renderer::executeInRenderContext() needs to handle nested calls and suspended fibers

Postponing 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.

catch’s picture

Actually postponed on #2511330: Deprecate RendererInterface::render()'s sole $is_root_call parameter.

Rebased on top of that to check something.

catch’s picture

Issue summary: View changes

This 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.

catch’s picture

Updated the issue summary.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.