3 ms·
I’d be curious between using Chrome headless vs a Node server. Was this tested?
by chrischen 8y ago
I’d be curious between using Chrome headless vs a Node server. Was this tested?
- lucideer 8y agonode is a JavaScript runtime, it has no rendering component, and—more notably—no DOM or any other equivalents to many browser APIs in its core API. This would mean you would have to emulate the browser environment with many 3rd-party implementations which are unlikely to match a modern, complex browser in aggregate.
- geo_mer 8y agoThank you! I actually developed it because I have developed a somewhat complex website using vue.js and it was too complex/too late for my architecture to do the native Vue SSR using Node.js so I built rendora instead. I have some really complex pages that are rendered below 150ms (uncached SSR requests). I also tested it on some simple React pages and got as low as 70ms! so I now guess headless Chrome isn't as slow as you might think. Also some other optimizations are made to help lower latencies (skip fetching&rendering CSS, images, fonts, etc..) so that the initial DOM load can be faster. I also added Prometheus metrics and a rendering API endpoint so that you can get an SSR latency histograms with buckets 50ms, 100ms, ..., 500ms and see the avg latencies for your use case. TLDR; headless Chrome is actually faster than you might initially think. It might be 200-300ms at maximum to get the initial DOM load assuming that you have complex enough pages.