8 ms·
I wonder if you can get better performance than the built-in browser engine for certain complex layouts by first calculating the layout using Clay and then abso
by agentcooper 2y ago
I wonder if you can get better performance than the built-in browser engine for certain complex layouts by first calculating the layout using Clay and then absolutely positioning the elements with HTML/CSS.
There was some news feed web app that used <canvas /> for better scrolling performance.
- chii 2y agoif you can guarantee that layouts don't change during interactions, i guess it _might_ save some time for the browser (and thus battery, for low power devices). If layouts change during interaction (e.g., orientation swap), then you will have a roundtrip to the server to recalculate. I assume this would cost more time than letting the browser css engine do their thing.
- agentcooper 2y agoIn my comment I assumed that Clay layout is running in the browser as well, but your idea of running it before serving the HTML is quite interesting!
- chii 2y agoI wonder if this would be more efficient than the browser's impl. But i guess if clay does less complex layouts (but which is still sufficient for applications) than css, it might be faster than the browser's own. Very curious train of thought.
- codr7 2y agoVery interesting indeed, score one more for server side generation.