June 21st, 2019

Replying to a tweet from @slightlylate

For clarity: is the problem with server-side rendering or is the problem with rehydration?

(e.g. if I serve up HTML+CSS and then don’t subsequently dump a bucket of JS on everything, is it fair to say that’s good for performance?)

51° N , 0° E

Also on Twitter

Reply Retweet Favourite

Responses

Simon Knox

I think the problem is mostly with rehydration. Also app initialisation if you have giant JS bundles. Visually complete but non interactive pages are frustrating (buttons/inputs don’t work).

# Posted by Simon Knox on Friday, June 21st, 2019 at 7:46am

Andy Davies

In my experience the problem is with rehydration- both in terms of the size of the state sent over the wire, and cost of deserialising it. Of course the larger the state is, the longer it takes to generate and serialise on the server so response times increase too

Andy Davies

It seems as an industry we’ve forgotten the downsides of .Net’s ViewState and we’re busily re-implementing something similar in JS

Andy Davies

Fortunately we haven’t adopted the postback model of .Net

Simon Knox

You add the explanatory text: My Website (artist’s rendition)

# Posted by Simon Knox on Friday, June 21st, 2019 at 11:04am

Simon Knox

You add the explanatory text: My Website (artist’s rendition)

# Posted by Simon Knox on Friday, June 21st, 2019 at 11:04am

Adam Auckland

The post back model might work in a low-latency 5G world where the response times are in milliseconds vs hundreds.

Jeremy Keith

I feel like we need a word or phrase to encapsulate SSR + rehydration; just saying SSR doesn’t cover it, in my opinion—it puts the emphasis on the part that isn’t causing the problem. adactio.com/notes/15367

Jeremy Keith

I feel like we need a word or phrase to encapsulate SSR + rehydration; just saying SSR doesn’t cover it, in my opinion—it puts the emphasis on the part that isn’t causing the problem. adactio.com/notes/15367

Alex Russell

Hrmmmmm…I mostly agree, but the TTFB consequences of these architectures tend to also be problematic. Obviously not nearly as bad as the rehydration and JS tax, but not ideal either. Maybe we need a term that describes this approach done right?

Paul Kinlan

I always called it progressive loading… But I’m aware progressive gets overloaded a lot.

Alex Russell

That is, if you sequester your heavyweight JS to the server, send only minimal script, and don’t tax everyone with massive inline blobs of Redux state, maybe that’s materially different in a way we can name?

Shane Hudson

Interesting. I’ve always thought the other way around - rehydration being the solution required to fix the situation when all the frameworks were client-side-only.

Tim Kadlec

Yeah…that’s super fair. Problem is most frameworks SSR solutions have assumed rehydration is involved by default (hence all the conflation and confusion). Likely because, as JS frameworks, they were built with a front-end bias first and the server side stuff mostly came later.

# Posted by Tim Kadlec on Friday, June 21st, 2019 at 1:40pm

Oli

ime the tradeoffs aren’t worth it for a non-trivial amount of serialised state (e.g. we inline a huge blob of Redux store + translations that are already in the HTML). This makes the initial HTML payload way bigger and slows down the time-to-interactive developers.google.com/web/updates/20…

# Posted by Oli on Friday, June 21st, 2019 at 1:44pm

Oli

ime the tradeoffs aren’t worth it for a non-trivial amount of serialised state (e.g. we inline a huge blob of Redux store + translations that are already in the HTML). This makes the initial HTML payload way bigger and slows down the time-to-interactive developers.google.com/web/updates/20…

# Posted by Oli on Friday, June 21st, 2019 at 1:44pm

Scott Jehl

Sounds a lot like Progressive Enhancement, done well.

# Posted by Scott Jehl on Friday, June 21st, 2019 at 4:12pm

Scott Jehl

It’d be helpful to see a TodoMVC example from the popular SSR + rehydration workflows (including some populated state from the start). I feel like I might have seen this somewhere but I can’t find it…

# Posted by Scott Jehl on Friday, June 21st, 2019 at 4:22pm

12 Likes

# Liked by Simon Knox on Friday, June 21st, 2019 at 7:59am

# Liked by Jamshid Hashimi on Friday, June 21st, 2019 at 7:59am

# Liked by Stuart Langridge on Friday, June 21st, 2019 at 7:59am

# Liked by Andy Davies on Friday, June 21st, 2019 at 8:28am

# Liked by Yoav Weiss on Friday, June 21st, 2019 at 8:56am

# Liked by Michael Geers on Friday, June 21st, 2019 at 9:21am

# Liked by Jason Neel on Friday, June 21st, 2019 at 9:46am

# Liked by Ethan Marcotte on Friday, June 21st, 2019 at 3:28pm

# Liked by Miguel Coronel on Friday, June 21st, 2019 at 3:28pm

# Liked by João Cunha on Friday, June 21st, 2019 at 4:32pm

# Liked by zack krida on Friday, June 21st, 2019 at 4:57pm

# Liked by Shaun Rashid on Saturday, June 22nd, 2019 at 12:35am

Have you published a response to this? :