Tim Kadlec, a web performance consultant, writes about JavaScript costs, AMP, web standards and the ethics of performance.
HN commenters cite his data on how fast AMP is and the CPU cost of JavaScript frameworks when debating web performance.
I think author's point is that React is the absolute worst of the evils and it's proprietors shout its false virtues so loudly that it drowns out all discourse and rational thought.
It performs the worst (by a large margin) of the major JS frameworks https://krausest.github.io/js-framework-benchmark/2023/table_chrome_109.0.5414.87.html#eyJmcmFtZXdvcmtzIjpbImtleWVkL2FuZ3VsYXIiLCJrZXllZC9yZWFjdCIsImtleWVkL3JlYWN0LWhvb2tzIiwia2V5ZWQvc29saWQiLCJrZXllZC9zdmVsdGUiLCJrZXllZC92YW5pbGxhanMiLCJrZXllZC92dWUiLCJub24ta2V5ZWQvcmVhY3QiLCJub24ta2V5ZWQvc3ZlbHRlIiwibm9uLWtleWVkL3ZhbmlsbGFqcyIsIm5vbi1rZXllZC92dWUiXSwiYmVuY2htYXJrcyI6WyIwMV9ydW4xayIsIjAyX3JlcGxhY2UxayIsIjAzX3VwZGF0ZTEwdGgxa194MTYiLCIwNF9zZWxlY3QxayIsIjA1X3N3YXAxayIsIjA2X3JlbW92ZS1vbmUtMWsiLCIwN19jcmVhdGUxMGsiLCIwOF9jcmVhdGUxay1hZnRlcjFrX3gyIiwiMDlfY2xlYXIxa194OCIsIjIxX3JlYWR5LW1lbW9yeSIsIjIyX3J1bi1tZW1vcnkiLCIyM191cGRhdGU1LW1lbW9yeSIsIjI1X3J1bi1jbGVhci1tZW1vcnkiLCIyNl9ydW4tMTBrLW1lbW9yeSIsIjMxX3N0YXJ0dXAtY2kiLCIzNF9zdGFydHVwLXRvdGFsYnl0ZXMiXSwiZGlzcGxheU1vZGUiOjEsImNhdGVnb3JpZXMiOlsxLDIsMyw0LDVdfQ==
And is highly inefficient in both compute and space: https://timkadlec.com/remembers/2020-04-21-the-cost-of-javascript-frameworks/
Comparatively, Vue for example, can be used progressively. It is one of the core reasons the Wikimedia Foundation and GitLab chose it:
https://phabricator.wikimedia.org/T241180 . Solid and Preact both perform close to Vanilla and bundle far smaller, improving the end user experience. One of Vue's…
Interesting that they aim to have a single resolution-independent logo ("This tied into another goal of having the image hold up with greater clarity at smaller sizes" and "with high resolution displays in mind"), while traditionally, advice was to tweak icons to their display size and resolution. For example, https://developer.apple.com/library/mac/ipad/#documentation/userexperience/conceptual/applehiguidelines/IconsImages/IconsImages.html says "redraw art as you scale down" and "do not use the standard-resolution 32x32 icon as the 16x16@2 icon". Similarly, http://msdn.microsoft.com/en-us/library/windows/desktop/aa511280.aspx says "Simply scaling down from the 256x256 size does not work" and "As an icon gets smaller, transparency and some special details found in larger sizes should be sacrificed in order to simplify and get the point across."
This isn't purely by technological choice ("we want a svg logo"), as one can somewhat build a svg where the level of detail varies depending on display size (http://timkadlec.com/2013/04/media-queries-within-svg/).
So it's either a deliberate "it's better that way" choice, or a "better one really good logo than a couple of less good ones", or they weren't aware of media queries, or they don't think them supported well enough.
The first article I found about this was https://timkadlec.com/remembers/2018-03-19-how-fast-is-amp-really/, which claims that AMP is actually faster in practice, probably mostly because it encourages good habits. Where are you seeing that it's not faster? This article is from '18 so perhaps there has been a change in how well AMP performs versus the baseline.
Also worth noting that we should probably judge AMP as a whole product. What if it didn't make things faster at all, but did make them predictable and amenable to prerendering? The product is AMP+Cache+Prerendering. Prerendering unquestionably gives huge speed advantages in many scenarios. If you don't have AMP, you don't have prerendering, which means AMP-as-a-product gives significant speed advantages, since it's on the critical path to prerendering. (All of this is of course predicated on the idea that you can't practically prerender normal HTML pages, which perhaps you can, I don't know. I'm just saying if that justification for AMP is correct, it shouldn't necessarily matter that HTML+AMP markup is not faster than HTML markup.)
There was another article here recently that is relevant[1]
One takeaway was that given a large sample of sites, the baseline size correlates fairly well with how the bundle size scales as projects grow. So if you have a 65kb baseline, you're more likely to end up with a larger bundle size in a "real world" project than if you used a framework with a 5kb baseline. The reasons are not clear (they could be anywhere from direct causation to indirect causes like incidental complexity due to some communities' higher likelihood of using libraries without auditing them), but the results are what they are, nonetheless.
Also, 65kb gzipped means you're running the uncompressed amount of JS. As a rule of thumb, the more JS you're running, the slower the site is going to be. This matters a lot for mobile, where JS execution speed can be absolutely abysmal (on top of slow network speeds, higher chance of resource timeouts, etc).
[1] https://timkadlec.com/remembers/2020-04-21-the-cost-of-javascript-frameworks/
Why would you consider these analytics scripts useless? The article mentioned several reasons they want to be tracking this timing information (monitoring of slow backends/CDNs and the performance of their own scripts) - having that information is vital for ensuring the usability of the site [1]. If a portion of your userbase all of a sudden starts loading the webpage much slower than usual (e.g. from issues as diverse as bad network routing or just a specific browser choking on your scripts), having the information available to you to quickly diagnose and fix the problem is a lifesaver. After all, the website is their product, so they need to ensure it's always available and usable for all their customers.
[1] http://timkadlec.com/2014/01/fast-enough/
Finally!
'Pointer events' originated at Microsoft, after the W3C effort to standardize Apple's 'Touch events' became uncertain due to patent issues. For a while, despite admitting it's a more elegant spec for unified input, Google were reluctant to add it because Apple wasn't interested [1][2].
Now Google have changed their mind once more and shipped this, making Apple the only major outlier. The pains of shimming these similar-but-different APIs will continue for a bit, but hopefully Apple will make this concession in the end.
[1] https://timkadlec.com/2015/02/apples-web/
[2] https://mobiforge.com/news-comment/who-wants-pointer-events-api-everyone-nearly