5 ms·
Sure, but every user has to do that initial page load. If all initial page loads are slow and expensive, it affects the user experience and costs money. Also,
by nathan_long 9y ago
Sure, but every user has to do that initial page load. If all initial page loads are slow and expensive, it affects the user experience and costs money.
Also, if you start getting requests faster than you can do the initial render, each subsequent user has to wait in line longer than the one before. Your server-side framework won't even show you how long people waited for a TCP connection.
- kraftman 9y agoBut they're going to have to wait for the initial page load either way, whether it's rendered server side and sent over or they're shown some static content until its rendered client side?
- pmontra 9y agoThey do, but the load will be spread among clients. The issue here is the load on the server.
- kraftman 9y agoI guess it depends on which direction you're coming from. From a traditional server side point of view, you're reducing the server work to just that first page load and making the client do the rest.
- nathan_long 9y agoTrue. But making all server-side renders really efficient and fast is an option, too. http://nathanmlong.com/2016/11/elixir-and-io-lists-part-2-io-lists-in-phoenix/ http://nathanmlong.com/2016/11/elixir-and-io-lists-part-2-io...
- deleted 9y ago[deleted]
- scyber 9y agoIf the Server rendered page is not user specific and is generic for all users then it can be cached and served quickly. Then only potentially one user would experience a slowdown and you can serve much faster. Of course then you get into the fun of cache management and invalidation.
- nathan_long 9y agoElixir Phoenix has a game-changing approach here because of how it compiles templates. Effectively, the static part is always cached (until the template changes), but the dynamic part is never cached. Nothing to manage. See http://nathanmlong.com/2016/11/elixir-and-io-lists-part-2-io-lists-in-phoenix/ http://nathanmlong.com/2016/11/elixir-and-io-lists-part-2-io... for explanation.