4 ms·
I actually posted a piece today, comparing the performance of every website on madewithangular.com with every website from the next.js showcase: https://alexkr
by Alex3917 4y ago
I actually posted a piece today, comparing the performance of every website on madewithangular.com with every website from the next.js showcase:
https://alexkrupp.typepad.com/sensemaking/2022/06/angular-without-ssr-is-faster-than-nextjs-with-ssr-i-have-the-data.html https://alexkrupp.typepad.com/sensemaking/2022/06/angular-wi...
If you look at the distribution of PageSpeed Insights performance scores, it's very clear that choice of framework is not what causes bad performance. The data shows that Angular might be a little better than Next.js for getting top scores, but for the vast majority of sites, the reasons for bad performance have nothing to do with framework.
Put another way, the average Next.js site has a performance score of ~35, which is terrible. If you were to rewrite your site in Svelte, then maybe it would go to 36, which is still terrible. Unless you are already spending the money to be in the top 1% of all websites in terms of performance, then you might as well just pick a tech stack at random -- at least as far as performance is concerned, obviously there are other factors at play.
To make this even more concrete, let's say it would take 18 months to rewrite your front end in Svelte -- so ~3,000 hours to get an expected PageSpeed Insights improvement of 1 point. Alternatively, let's say it takes 5 hours to replace Moment.js with Day.js, which has an expected improvement of 5 points. That means replacing Moment.js with Day.js would be, on an hour-per-hour basis, 3,000x more cost effective than switching frameworks. And yet nearly every time I talk with a startup that is considering doing something about their slow SPA, it's usually just spending millions of dollars to rewrite it in some trendier framework.
- dieulot 4y agoThis article compares the CPU times of every site using Angular/React/Vue/jQuery known by the HTTP Archive and comes to a very different conclusion: https://timkadlec.com/remembers/2020-04-21-the-cost-of-javascript-frameworks/ https://timkadlec.com/remembers/2020-04-21-the-cost-of-javas...
- Alex3917 4y agoIt looks like the author has come to a fairly similar conclusion, albeit from measuring something completely different: "It’s worth noting that because sites with React or Angular spend more time on the CPU than others, that isn’t necessarily the same as saying React is more expensive on the CPU than Vue.js. In fact, it says very little about the performance of the core frameworks in play and much more about the approach to development these frameworks may encourage (whether intentionally or not) through documentation, ecosystem, and general coding practices." CPU usage is vaguely interesting, although I assume the vast majority of people care more about their page load speed. I'd also note that relying on technology detection from some third party is potentially going to be very misleading, unless that data is actually regularly updated. Sites change their technologies all the time, so even a significant percentage of the sites from the Next.js Showcase and MadeWithAngular.com aren't actually made with those technologies. Unless you take the time to either go through each site by hand, or else pull out the code from the Chrome extension for each framework to detect its presence in the way that the authors of that framework endorse, then you could easily have ~30% of the sites for each technology no longer actually using that technology.