Document why BigPipe no-js placeholder rendering doesn't use Fibers

Created on 26 August 2023, 10 months ago
Updated 30 November 2023, 7 months ago

Problem/Motivation

Postponed on πŸ“Œ Add Fibers support to Drupal\Core\Render\Renderer RTBC and πŸ“Œ Add PHP Fibers support to BigPipe RTBC , there is not a strict dependency but this is probably the most complicated of the three.

BigPipe has two placeholder replacement methods, one when JavaScript is enabled and one when it isn't.

The no-js method renders each placeholder and flushes the page as it comes in (as opposed to the js method which renders the whole page with placeholders then replaces them with JavaScript).

To add Fibers support, we would need to do something like this:

1. Create fibers for each placeholder in rendering order.
2. Maintain the 'current' placeholder fiber and an array of the other remaining fibers.
3. Try the current placeholder fiber, if it's suspended, start one of the remaining fibers, as soon as it suspends or finishes, go back to the current placeholder fiber, if it suspends, resume the other one or start a third one, and then back again - this is to ensure we're still sending each sequential placeholder as quick as we can.

We could also decide this isn't worth the complication and just skip Fibers for this case, which should be quite minor anyway (session cookie but no JavaScript), it would become a bit less minor if we introduce sessionless bigpipe into core.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BigPipeΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024