Live data from Hacker News

React Server Components made our site a lot faster

frigade.com

11–20 of 62 posts

Re: React Server Components made our site a lot faster

#12

Our site is dealing with a dynamic where our Core Web Vitals are already green, and thus our priority-setting folks don't see it as a priority to improve the score any further. I want to be able to tell them "Hey, Green at 600ms will still give us an SEO boost over Green at 800ms, so we should do this," but I am having a hard time establishing whether that is actually true. Does anyone know for sure?

There's a temptation to get caught up on quantifiable scores when working on SEO because so much of it can't be quantified, everyone is mostly guessing what Google wants... however, scores are ultimately meaningless and you should be measuring the impact on your business metrics. For example, if your website is designed to generate sales, did reducing your CWV to 800ms improve revenue? SEO is a means to an end, you c…

If you want to know if those 200ms matter, try adding 200ms of artificial latency on every page load for a week and see what it does to conversions.

As a first approximation, the difference between 600ms and 800ms will probably be similar to the difference between 800ms and 1000ms. You should be able to get a rough figure of what that difference is with 1 line of change to your code.

Re: React Server Components made our site a lot faster

#13
That’s great. What if I don’t want to write a whole new NodeJS backend just to support SSR, when the existing backend with all our APIs that we already wrote is a Spring Boot service?

I’ve looked at Nashorn and then Graal to do this, but couldn’t find widely supported resources that work well and snap right in. Anyone in the same boat that has had success?

Re: React Server Components made our site a lot faster

#14

Hey HN! I wanted to share an experiment I ran that tests the performance of RSC vs traditional client-side React on one of our product websites (productonboarding.com). I know RSC is a bit of a controversial topic since server-side rendering used to be an ancient paradigm with the shift to modern JS frameworks. As such, I went into the experiment with a healthy dose of skepticism. To test this out, I conducted an exp…

A site visit might consist of more than a single page load, and (hopefully) includes some interactions. For some sites, "client-side + HTTP data as needed" strategy will have a longer time to first render, but might be much quicker once you introduce interaction.

It doesn't look like either of your tools measures overall performance for a site visit (as I characterize it), but maybe it doesn't matter in your case. What was your thinking in this regard?

Re: React Server Components made our site a lot faster

#15

I wonder how much overhead does the rendering or react on server add ? If I have an API sever and then instead of calling those apis from client, I make all db calls on the server and then render the html. How much of processing that was done was spent on rendering html. Also I wonder how react server components and serverside rendering go with localfirst software? I love localfirst web apps, they seem kinda incompat…

You can choose on a component basis what you render server-side.

This project is a marketing site, for which client-side rendering never made sense.

Re: React Server Components made our site a lot faster

#17

That’s great. What if I don’t want to write a whole new NodeJS backend just to support SSR, when the existing backend with all our APIs that we already wrote is a Spring Boot service? I’ve looked at Nashorn and then Graal to do this, but couldn’t find widely supported resources that work well and snap right in. Anyone in the same boat that has had success?

There is SPA on Pjax. You can use an independent HTML and/or JSON server in any language to create SPA.

https://github.com/falsandtru/pjax-api

https://falsandtru.github.io/pjax-api/docs/modes/

Re: React Server Components made our site a lot faster

#18

That’s great. What if I don’t want to write a whole new NodeJS backend just to support SSR, when the existing backend with all our APIs that we already wrote is a Spring Boot service? I’ve looked at Nashorn and then Graal to do this, but couldn’t find widely supported resources that work well and snap right in. Anyone in the same boat that has had success?

I also maintain a JVM which we run some backend JS libraries on via custom Nashorn builds. It's slow and drinks memory. Setting up a façade in front of a pool of ScriptEngine objects mitigates some of the startup cost, but I super don't like the idea of running React for server rendering. I would suggest standing up a NodeJS rendering microservice instead; we'd do it if arcane deployment reasons didn't preclude the possibility.

Re: React Server Components made our site a lot faster

#19
I must be getting older, because "everything old is new again" keeps coming to mind.

Only advice would be: don't follow these fads unless you a) are doing it to learn or b) can quantify tangible business value in the change. The worst reason to do it is because everyone else seems to be doing it*

*Unless literally everyone is doing it and the "old" thing becomes unsupported.

Re: React Server Components made our site a lot faster

#20

Hey HN! I wanted to share an experiment I ran that tests the performance of RSC vs traditional client-side React on one of our product websites (productonboarding.com). I know RSC is a bit of a controversial topic since server-side rendering used to be an ancient paradigm with the shift to modern JS frameworks. As such, I went into the experiment with a healthy dose of skepticism. To test this out, I conducted an exp…

> I know RSC is a bit of a controversial topic since server-side rendering used to be an ancient paradigm with the shift to modern JS frameworks

I need to go lie down

Post reply on HN