Go check out the newest version of Crater.
I also wrote a bit in the announcement thread about why it is so fast now.
Go check out the newest version of Crater.
I also wrote a bit in the announcement thread about why it is so fast now.
Great work! This is really much faster than before.
Yeah it faster then before. But what’s the logic making React SSR contribute to speed? Isn’t that need server to render html? Client side rendering should be faster because it only need browser to render html
SSR is almost always used specifically to make the page load faster.
Here’s the flow with SSR:
Without SSR:
I don’t think that’s 100% accurate, but you get the point.
So, a few things here, that you are combining…
React is making it faster. WAY faster.
SSR is helping with initial page load because the html is already built for your browser and then DDP kicks in and grabs updates.
If you aren’t logged in, I am actually caching the pages for 30 minutes and serving straight from the file system, which is a huge speed gain too.
The real downside of all this is that Blaze is still being shipped with packages like accounts-twitter, so the overall JS bundle is at like 4mb right now
I suppose that @sacha can speak to any changes he might have made regarding the backend, I know the schema stayed 100% the same as I was running both versions side by side for about a week of beta testing using the same prod db.
To add some more precision, the SSR flow in a Meteor app looks something like this:
This means that you need to make sure that the initial HTML, the fast-rendered data, and the DDP data all match, otherwise you get weird bugs. And you also have to be careful with things like dates, cookies, etc. that might be different on client and server.
And Telescope’s back-end hasn’t changed much. I did refactor a lot of the code, but it’s still basically doing the same things.
If you want to see an example of DDP kicking in after a fast rendered page is served up, just log out and open a new browser window and hit Crater.io. You will be served a cached page from Nginx, then DDP will kick in and update the page.
From glancing the release note, I can tell that it must have been a lot of work. Appreciate it @joshowens.
Thanks, but a lot of the heavy lifting was on @sacha’s end
I did some testing, tweaking, server setup, etc.