5 ms·
On the bright side, the performance tax we had to pay before the current generation of frameworks was often the "full page reload" tax, needing to parse megabyt
by naranha 6y ago
On the bright side, the performance tax we had to pay before the current generation of frameworks was often the "full page reload" tax, needing to parse megabytes of CSS, JS for almost every user interaction.
- goatlover 6y agoAren't those usually cached? Page reloads these days are fast.
- avens19 6y agoThey said parse which is true regardless of caching
- deleted 6y ago[deleted]
- goatlover 6y agoThe JS parsing would be less.
- nitsky 6y agoYeah, parsing of megabytes of CSS and JS is not necessary on each page load, but you still need a round trip to a server on each interaction, and a full page of HTML, even if only a small part of it has changed.
- hinkley 6y agoAnd then the Phoenix (Elixir) framework introduces LiveView in 2020... If you haven't already figured out, everything old is new again. This was an old pattern when someone taught it to me at my first job. It felt like it wasn't happening for a few years but only because everything was new to me. Then I started seeing people win arguments arguing for the things that we had just finished replacing, and the most I've ever seen since is brief respites as the pendulum approaches the apex on each swing.
- goatlover 6y agoSo is the round-trip to the server going to be noticeably slower to the user than an SPA on average?
- nitsky 6y agoThis is a very good point. Ironically, SPAs feel slower to me than most server rendered apps.
- karatestomp 6y agoSPAs have to do quite a bit before they're ready to start doing what the SSR page was doing as soon as the last byte landed on the client. Old-school AJAX shipped HTML to be dumped straight into the document. I suspect that was much faster than the modern approach of sending, typically, JSON, which then requires deserialization, a bunch of transforming, memory allocation, shifting data around, template application, et c before any DOM changes are handed over to the browser engine, at which point you've just finally caught up with the approach of shoving HTML into the DOM directly.
- batiste 6y agoYou could do some Ajax request with jQuery and update the page.
- karatestomp 6y agoMeanwhile, "basic HTML" gmail reloads its full page while the AJAXy versions are still showing a loading state for whatever you clicked on.