On Visions for Performance, or: Performance Optimization Is a Process
Published on DecĀ 4, 2018 (updated OctĀ 1, 2022), filed under development, performance, optimization (feed). (Share this on Mastodon orĀ Bluesky?)
Particularly in the context of performance budgets, itās smart to develop a performance vision: What goals does one wish to achieve for the performance of a site or app? Yet assuming performance visions to be meant to be achievable, some of the soundest approaches have their own particular problems, and in them we recognize that performance, or performance optimization, is indeed a process.
Letās start with those sound approaches, borrowing from Safwan Samla at this yearās GDE Summit. These entail the following main ideas:
- improve yourself; or
- be better than the competition; or
- be the best.
These main ideas are useful because itās not possible to give specific criteria and visions that are applicable to every project, and so the ideas factor in that āit depends,ā and that goals have to be related to the project in question. And still, thereās something problematic to be found with each approach:
Improving oneself has a hard limit on how much one can improve. This is a bit theoretical, but the basic idea is this: Once we maxed out all the performance-related knowledge we have, we can obviously not improve any further. (I get back to this in a second.)
Being better than the competition is ultimately a poor goal, especially if the competition is all worse than oneself; and if the competition is not worse but simply average, with this approach one would well end up average, too. In most cases, weāll at some point need to switch to a different visionāwhich evidently undermines the approach.
Being the best is a super-competitive stretch goal, and some may like it for whatever fuels them. Yet ābestā is so tricky to define that one could not be best without also defining a tech-philosophical model that justifies respective claim and all underlying decisionsāif itās a basic website one could attack any claim of ābestā performance on grounds that itās too basic, and a complex site or app could likewise legitimately be attacked by questioning the mere existence of any element and pattern used (as its existence makes everything slower).
Just imagine example.com and amazon.com were optimized to the absolute known performance maximum, more than any other site of the planet, and you could dismiss example.comās optimization as naive and amazon.comās optimization as premature. And then we could still add, whatās ābestā anyway?
Most promising, therefore, seems to be to focus on oneself and oneās project for optimization. That, as I suggested, would depend on what oneself knows, and whether and how oneself learnsābecause, a difficulty with my counter-argument, we would probably not stand still and one day know that we reached our limit and we couldnāt improve performance any further. Just stopping here and dismissing the concerns I outlined seems too simple, however, because thereās only one tiny amendment weād need to make explicit to save the approach: to set a new goal once we reached whatever we aimed for on the basis of improving ourselves and our projects.
This may appear obviousābut itās not: It cannot (or probably shouldnāt) be taken for granted that everyone knows what happens once a vision has been accomplishedāit needs to be called out. It needs to be made clear that any performance goal that got reached is to be followed by a new performance goal.
That, then, leads us to the idea of this post: If our performance visions can only be iterations, then performance optimization itself is, just like web design, a process.
Weāve all known this all alongāwhen would we ever be ādoneā optimizing for performance?ā, but Iāve liked this one angle at performance optimization. Please poke holes into my reasoning.
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a web developer, manager, and author. Iāve been working as a technical lead and engineering manager for companies youāve never heard of and companies you use every day, Iām an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for OāReilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)