Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
FaceBook uses BigPipe in tandem with PJAX/Turbolinks-style partial rendering of the next URL the user navigates to. (IIRC they call those "partial reloads".) It then does a full reload every 10 requests (at least 4 years ago) to avoid memory consumption in the browser from growing too big.
Note this could also be implemented in a separate module, it is actually not specific or even related to BigPipe.
See:
- https://github.com/defunkt/jquery-pjax
- https://github.com/rails/turbolinks/
- http://geekmonkey.org/2012/09/introducing-turbolinks-for-rails-4-0/
- https://blog.engineyard.com/2015/a-look-at-rails-5
- https://www.nateberkopec.com/2015/05/27/100-ms-to-glass-with-rails-and-t...
- https://github.com/Shopify/turbograft (more advanced fork of Turbolinks, Shopify uses this in production)
- https://github.com/helthe/Turbolinks (Symfony component)
Comment | File | Size | Author |
---|---|---|---|
#6 | Turbolinks quick PoC 60fps.mp4 | 2.05 MB | Wim Leers |
Comments
Comment #2
Wim LeersComment #3
Wim LeersRelated reading:
Comment #4
Wim LeersComment #5
Wim LeersMore related reading:
Comment #6
Wim LeersI created a very very very rough/hackish prototype. Still, it's showing promise already. This shows the difference in loading a page with and without turblinks, while switching between two nodes (note the changing URL in the address bar), with Turbolinks replacing the page's title and the main content.
Again, a very incomplete, very hackish implementation, but the visual difference is quite significant.
Comment #7
attiks CreditAttribution: attiks at Attiks commented#6 Neat!
Comment #8
serg2 CreditAttribution: serg2 commentedThis looks impressive!
Is this with Turbolinks or the Turbograft port? What percentage of the normal page traffic is sent to the browser on the update? Most of it will be browser cached anyway but wondering if it is(in theory) sent/requested.
(This really highlights how much effect our broken toolbar has on the perceived speed of D8)
Comment #9
Wim LeersThis is with custom JS, building on top of Drupal's "AJAX system" and "behaviors" abstractions. The latter in particular allows us to avoid a big problem that many Rails apps have: they have JS doing
jQuery.ready(…)
, which we've been warning against for many years now. Thanks to that, it's easy for us: we just need to detach behaviors on the old content, and attach it on the new content.And since it's a super rough prototype, I can't actually answer the other questions yet.
Stay tuned for more to come in the next few weeks.
Comment #10
Wim LeersGood news! Acquia has given me time to push this forward. The result is an initial implementation that works in any theme, with Blocks/Panels/page manager/anything, and only sends regions that are changing between pages.
See https://www.drupal.org/project/turbolinks.
8.x-1.0-alpha1 release: https://www.drupal.org/node/2692267.
Comment #11
droplet CreditAttribution: droplet commentedCongrats having fund to work on it :)
I have a quick look but it doesn't work out of box. ( empty responses )
Waiting for next releases!
Comment #12
Wim LeersDid you apply the core patch? I bet you didn't, that would explain the broken responses :)
Comment #13
almaudoh CreditAttribution: almaudoh commentedCore patch? Is there a core patch needed for this to work?
Edit: maybe that should be mentioned in the project page
Comment #14
almaudoh CreditAttribution: almaudoh commentedGreat!! So the visibility of
HtmlRenderer::prepare()
needs to be made public, and then it works.TurbolinksRefreshLess is sweet!! Wim++Edit: Turbolinks sucks :(
Comment #15
Wim LeersIt's mentioned in alpha 1's release notes. I hope to be able to get rid of the core patch over time.
Comment #16
droplet CreditAttribution: droplet commentedCool. It does the tricks.
Comment #17
Wim LeersComment #18
andypostNaming things... Wim rocks!