Simplify BigPipe JS processing

Created on 24 May 2025, 7 days ago

Problem/Motivation

We use mutation observers to detect and load pieces of html to process with bigpipe. We can let HTML do the job with a tiny onload attribute on an <object> element.

Steps to reproduce

Proposed resolution

Add

<object onload="Drupal.bigPipeLoad(this.previousElementSibling)" height="0" type="text/plain" data="data:text/plain,"></object>

To trigger the processing of a pieces of bigpipe content instead of tying to guess when it's loaded though mutation events.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

big_pipe.module

Created by

🇫🇷France nod_ Lille

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

Merge Requests

Comments & Activities

  • Issue created by @nod_
  • Merge request !12224Resolve #3526447 "Simplify bigpipe js" → (Closed) created by nod_
  • 🇫🇷France nod_ Lille
  • Pipeline finished with Failed
    7 days ago
    Total: 228s
    #505671
  • Pipeline finished with Failed
    7 days ago
    Total: 118s
    #505673
  • Pipeline finished with Failed
    7 days ago
    #505679
  • Pipeline finished with Canceled
    6 days ago
    #506476
  • Pipeline finished with Failed
    6 days ago
    Total: 190s
    #506483
  • Pipeline finished with Failed
    6 days ago
    Total: 1489s
    #506490
  • I was curious about the test failures in BigPipeRegressionTest, and I think a large contributing factor is that using load events instead of the mutation observer causes the page to load much more slowly.

    Not scientific, but on my local ddev with standard profile and the big_pipe_regression_test module installed:

    • On HEAD, load time for /big_pipe_test_multiple_replacements was roughly 1m 13 sec
    • On the MR branch, load time for /big_pipe_test_multiple_replacements was roughly 14m 06 sec

    I think this is happening because event handling is synchronous and blocking, while the mutation observer works asynchronously.

  • 🇫🇷France nod_ Lille

    I profiled the change and this is a terrible, terrible idea. it's 10x slower and uses 10x the memory.

  • Pipeline finished with Failed
    4 days ago
    Total: 722s
    #507779
Production build 0.71.5 2024