Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming #1

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Streaming #1

wants to merge 3 commits into from

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Apr 21, 2022

Resolves

#5

Overview

Trying to experiment with streaming HTML and so created a yarn streaming command to test that out, but can't quite tell if it is working? Tried jacking up the HTML payloiad to 2.2MB and using a generator function + Buffer to break up the code and comparing that agains the same for yarn ssr

  • Lighthouse scores seem about the same
  • Due to the inflated size, JavaScript would (pre) load, but not execute, so as this page takes like 60 seconds to download, even with streaming, the events handlers and interactivity will not kick in until the very end, which is disappointing and perhaps defeats the value of streaming in some way? Or maybe that is the secret sauce things like Marko and Quick are able to solve for?
  • I would expect the data to take about the same amount of time but in Chrome at least, for non streaming, the HTML appears to show up right away anyway? Figured I would get a blank page or something until the page was done? 🤔

TODO

  1. Figure out a concrete way to benchmark Streaming vs Non Streaming
  2. Test validate in other browsers
  3. Figure out a way to have the JS kick even, even if the page is still loading / streaming
  4. Looks like using a Buffer introduced an encoding issue in the footer text

Screen Shot 2022-04-21 at 8 30 14 AM


An example someone shared on Twitter that might good to review.

@thescientist13 thescientist13 added the feature New feature or request label Apr 21, 2022
@thescientist13 thescientist13 self-assigned this Apr 21, 2022
@netlify
Copy link

netlify bot commented Apr 21, 2022

Deploy Preview for merry-caramel-524e61 ready!

Name Link
🔨 Latest commit 1727471
🔍 Latest deploy log https://app.netlify.com/sites/merry-caramel-524e61/deploys/626153fc42c8050009edca8d
😎 Deploy Preview https://deploy-preview-1--merry-caramel-524e61.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@thescientist13 thescientist13 added the invalid This doesn't seem right label Apr 21, 2022
Copy link
Member Author

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thescientist13 thescientist13 removed the invalid This doesn't seem right label Jun 17, 2022
@thescientist13 thescientist13 changed the title [DRAFT] Streaming Streaming Jun 17, 2022
@thescientist13 thescientist13 marked this pull request as draft June 17, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant