My challenge to the web performance community
philipwalton.com
philipwalton.com
To do that I'd have to implement features that track users, or at least report back to a server with data I could use to track users, and I don't want to do that. As unfortunate as lab-data-only tests are, I'd rather accept those limitations than gather data I don't have any genuine need for. Heck, I'd rather deliver a slightly slower website than do that.
Some websites probably do have a need for super accurate perf metrics, and the devs who build those sites will have to wrestle with the question of what data get to from users for themselves, but I believe we ought to be normalising limiting what data we gather in the real world for everything else.
Ultimately, when I ask myself whether performance is more important than user privacy, I end up answering no.
Thank you for this! We need more people like you building websites. Or less people unlike you, not sure which :)
Like others pointed out, it's fairly easy to test in a "lab" without affecting actual users. I wish more developers did just that to see how their software/website fares on low-resource hardware or lossy connection.
You don't need to associate data points with any kind of user profile. Sure, you _could_ maybe mine some noisy timings for user fingerprint entropy but... if you're building something more complicated than a blog, real performance data is very useful and the privacy implication is relatively minimal.
FID: First Input Delay: "the time from when a user first interacts with a page to the time when the browser is actually able to begin processing event handlers in response to that interaction"
But what's really hilarious about it all is that in my experience this kind of sites doing metrics gathering are the worst offenders in terms of performance. Please, just do what you need to do and don't add more bloat in the name of performance.
If you need to do tests, setup a test VM with 512MB RAM, 1s artificial latency and 20% packet loss. By testing for the "worst" case (which is close to the reality of many people) you ensure the average case is great.
And that is fine. Even if old browsers and noscript were supported, it's usually a small percentage.
> kind of sites doing metrics gathering are the worst offenders in terms of performance.
You have a point. I have a feeling it's an org problem, bloated org builds bloated products, but struggle to articulate it further.
> setup a test VM with 512MB RAM, 1s artificial latency and 20% packet loss.
A synthetic approach will get you a long way already. Though I would like to see it as part of the CI/CD pipeline. Testing perf has to be passive and continuous or it's useless.
If your product manager wants to know user screen resolutions it's much harder for them to argue "We track nothing, we need to implement tracking to get screen resolutions." than it is for them to say "We already track loading times; it's a few additional lines of code to add screen resolutions".
FWIW: In the past when I sold and supported these kinds of tools, users were completely anonymized - you saw them as "requests" rather than users. In fact, the best tools I saw didn't even capture "all" users, but rather did sampling based on various attributes, IE: request was outside the standard deviation.
Even if they get something in return like early access to something.
Even if they're happy to accept being tracked.
There just isn't a good justification for it in most cases. For a start, most sites that track users don't even use the data they gather. They're just gathering it because they're think they're expected to. So many sites implement Google Analytics, Hotjar, etc and then use the data as nothing more than a web counter. That's beyond infuriating to anyone who thinks privacy is worth fighting for. If you're going to violate my privacy, at least do it for a good reason.
In the case of the article there could be solid reasons for hoovering up lots of information about users. But really, unless you're in a massive company with significant resources, all of that perf data is just going to sit in a database and a senior might occasionally look at the dashboard overview and think "We should make our images smaller." or "Huh, users have a sucky time when they're on Android. Oh well.". Those are not good reasons to gather real-world user data instead of relying on Lighthouse scores. Lighthouse is "good enough" for most people.
I imagine that a frustrating part of working on web perf is that small companies and startups don't have the resources to do it well, so they end up cargo-culting what Google does but without spending time or effort to make good on what they might learn.
To be fair to the author, I'm much more at fault here than they are. I have no doubt that the article is aimed it at a much smaller audience (the web perf community), and now I'm here saying it's not applicable in a much broader context because it was posted to HN. I apologize to them for that. This is something I care about and it was an opportunity to rant. :)
This article advocates logging performance timings. You can’t track someone with that.
Firstly, yes you can - https://www.researchgate.net/publication/2441386_Timing_Atta... - but that's not the point here.
Secondly, web perf testing benefits from user tracking. It is very common for perf and tracking to be used together. In fact, I don't actually know of a time where I've seen perf metrics being used without tracking. I'd agree that it's possible to track perf metrics without tying them to a specific user, but even then you still need to be sending user data back to your server. I'm not in favour of that for something as trivial (in most case) as just making a website load slightly faster.
Site owners should start with the assumption that they don't actually need data and then only track things that are critical to the functioning of their website. There will be very few cases where knowing how fast the page loaded actually meets that criteria.
20 year old paper. "Domain tagging," Felten and Schneider's proposed countermeasure, was implemented as "cache partitioning" in Firefox, Safari, and Chrome. If you're aware of extant issues please let me know.
> In fact, I don't actually know of a time where I've seen perf metrics being used without tracking
Google's own library: https://github.com/GoogleChrome/web-vitals#overview, which is recommended in OP's article.
> I'm not in favour of that for something as trivial (in most case) as just making a website load slightly faster
No performance RUM means no knowledge of performance regressions. I have deployed changes that looked great on our CI and then gravely impacted performance for a segment of customers.
Blinding a business to user experience because you've read papers on historic exploits seems like odd logic to me. You can't do anything malicious with a DB of LCP timings.
HN's anti-telemetry mindset is baffling to me.
However, if you want good performance, do actual UX/performance studies without treating your users like lab rats (hell, even poor rats don't deserve that). Just nitpicking, but "first-party tracking" really falls into "phoning home" (just a different "home").
Also, i don't always have hundreds of tabs open. But even just following links published on HN regularly pops up an article with simple text and images that for some reason will try to run many scripts eating away all my resources. Tor Browser's Safest mode is perfectly able to run dozens/hundreds of tabs.
If you want to be more technical about it, there's obvious reasons for this. Of course, the client-side scripts are vastly inefficient because they're interpreted or JITed. And the scripts often have more than suboptimal ways to perform basic tasks which arguably could (should?) be declarative HTML/CSS elements which the browser could optimize for. Moreover, a single DOM change triggers redrawing, and some scripts are very keen on editing the DOM.
Then of course we could talk about cryptominers and trackers and whatnot. Some people on this very forum have advertised that it would be acceptable to embed miners in web pages so that clients "pay for" the content. This outlines the high-level problem with client-side scripting on the web: who decides what gets computed on our machines? The declarative model is arguably empowering users whereas client-side scripting (in a client-to-server model like HTTP) is certainly empowering website operators to abuse their users.
Can you write something which works in any browser,
regardless of device age, browser version, connection speed,
with progressive enhancement for more modern features?
That, on a page that was designed before the terms "mobile first" or "responsive" ever existed. Because good clean markup was, and remains, good clean markup.
Some features are too practical not to use. And some features are next to impossible to enhance progressively without introducing more bloat. There's not really a gradient between "no wheel" and "wheel".
If that Desire HD is not part of your target audience then there's no reason to pay the price to optimise for it.
I call it lazy, insensitive, careless, and perhaps a smidgen of incompetent. :)
I don't know my target audience ahead of time, and I want to be prepared for them, known AND unknown.
Your HTC Desire HD is welcome and supported on all my websites, and the fact that you have one is reason enough for me to support it.
I think it is a really shitty and rude thing to tell the user that their browser, device, configuration, etc. is "not good enough", because most of the time they have no control over it, and you're denying access to the people who need it the most.
When you've got a fast desktop to develop on and a decent salary to switch out your phone every year or two, it may be difficult to relate, but there are millions of people out there using five-year-old devices and struggling extra unnecessarily, and I refuse to add to the problem.
It has the nice benefit most untested devices and platforms also working, as well as nice accommodations for retro-computing enthusiasts.
Option 1: Being able to connect to a public WiFi network and browse Wikipedia over HTTP.
Option 2: Being "secure" in not being able to access the information at all due to HTTPS limitations?
It depends so much on what you're building.
Not everyone agrees, certainly not the majors, but I'm OK with just my little comfortable corner of the Web, which also happens to have no ads, trackers, bloat.js, and so on.
This is not a developer issue, this is a capitalism issues. Websites are used to make money, ergo they must rank high in search engines. A google engineer framing this as anything else is simply naive. SEO is a high stakes game, and they are the chief architects that made it so.
Don't get me wrong, personally I am happy that Google have forced sites to follow standards, move to more modern solutions and stop using so much javascript and other cpu and bandwidth hogging resources, but while they also continue to demand tracking of the world they are also contributing to the bloat, and being just a little bit hypocritical: "no bragging about scoring well in lighthouse, but it would be a pity if your scores went down and nobody could find you in a search ... ".
Not exactly the way it works. It's a pass/fail.
> For example, a page with an LCP of 1750 ms (better than the “good” LCP guidance) and another one with 2500 ms (at the “good” guidance) would not be distinguished on the basis of the LCP signal [0]
[0] https://support.google.com/webmasters/thread/104436075/core-...
If you don't specifically optimise for Lighthouse, and then score well in Lighthouse, it's likely a good measure of your site's performance. But if you specifically optimise for Lighthouse and then score well in Lighthouse, it's like practising for a psychiatric examination - it's now measuring your ability to game a test, and not much else.
Great point. Wonder how it handles things like LQIP
[0] https://philipwalton.com/static/lh-cwv-correlation-1400w-654...
All pages with two 'good' core-web-vital grade, and one 'poor' get exactly 200.
All pages with one 'good' and two 'poors' get exactly 100.
Getting 99/101/201/199 requires a much more specific set of performance characteristics.