90 points · by jotto · 9y ago · 39 comments
Given the V8 team has explicitly stated the plan to optimize for real websites rather than synthetic benchmarks [1] these results look completely appropriate and desirable. Good work V8 team!
https://blog.chromium.org/2017/04/real-world-javascript-perf...
Isn't that exactly what they were going for?
Anyway, there are so many engineering trade offs its like a big water balloon, squeeze it here and it gets faster in this spot, but slows down somewhere else. When, what you really need is a way to let some of the water out of the balloon.
Literally unbrowsable.
For example: you load the app in your headless browser and let it load as would in any browser. The browser fires some events and XHR/WebSocket requests and you can cleanly wait for them to finish as opposed to doing something like this: https://techbrunch.gousto.co.uk/2016/10/10/isomorphic-react-... which requires you to do some extra configuration in your app to help support a Node environment.
TL;DR: ReactDOMServer.renderToString won't wait for your async requests to finish, you need them to execute and finish before you call renderToString
This is sometimes devastating for me, as described here:
https://news.ycombinator.com/item?id=14617175
so decreasing memory usage would greatly help here.