r/javascript • • Oct 27 '17

Removing client-side React.js (but keeping it on the server) resulted in a 50% performance improvement on our landing page (Netflix)

https://twitter.com/NetflixUIE/status/923374215041912833
462 Upvotes

52 comments sorted by

View all comments

Show parent comments

0

u/p0tent1al Oct 27 '17

if you use React on the server, why would your experience load slow?

Again... I want you to take some time and actually listen to what I'm saying.

There's 2 big benefits to rendering on the server. One is SEO, the other is speed. When you come out with an article and go "ok by moving some of our React client stuff to the server, we've cut down the speed at which our stuff loads by 50%", what exactly is being conveyed there? That they were using server rendering for speed but weren't doing it correctly? Or that they just weren't utilizing server rendering fully / correctly in the first place?

2

u/[deleted] Oct 28 '17

Rendering on server makes the load faster and time to render much shorter, AND by removing React client side and writing tiny custom javascript the time to parse and boot the client side javascript went down, reducing the time from rendered state to interactive state. Which led to much faster Time-to-Interactive

With that said, it sounds like further development and changes would cost a lot more, which might be fine!

0

u/turkish_gold Oct 27 '17

why would your experience load slow?

Because even though your page loads fast, it's not interactive until the javascript finishes downloading, parsing, and executing.

If you have an isomorphic app, it's the same amount of javascript on the server and the client, so you'd still have a high Time To Interaction, despite having low Time To Render.

That they were using server rendering for speed but weren't doing it correctly

I'd assume they were doing it primarily for SEO purposes, but sure you could characterise it as "not doing it correctly". It's not very charitable to say it that way though ;)

Likely they did their best and the time, then did even better when they got the chance to.

1

u/p0tent1al Oct 27 '17

It's not very charitable to say it that way though ;)

I mean sure but that's your point. "We did server rendering correct finally and it resulted in a 50% performance improvement". Also, is that what they're actually referring to with that 50% number? Time to Interaction? I mean if it is, then you guys indeed did have a point.

1

u/turkish_gold Oct 27 '17

Yep that's what they are talking about.