Reduce usleep() calls in Renderer::executeInRenderContext()

Created on 7 October 2025, 2 days ago

Problem/Motivation

@berdir noted that when rendering lots of media entities via paragraphs there can be a lot of calls to usleep(), this is because 📌 Try to replace path alias preloading with lazy generation Active and 📌 Entity lazy multiple front loading Active actually suspend Fibers now.

The usleep() calls are intended to prevent a situation where we execute a long async query with nothing else to do in the meantime - in that case the loop could run endlessly.

However given we have the path alias/entity use-cases in core, which rather than repeatedly suspending, will always suspend once (per thing) then resume, I think we could only call usleep() once we've tried resuming a couple of times.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs review

Version

11.0 🔥

Component

base system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024