Performance War Stories
What the web needs to compete
After the introduction, Alex Russell explains why he works on performance as part of a strategy for keeping the web competitive with native apps. He identifies three requirements for the web to compete: broad and secure distribution, enough capabilities to meet users’ needs, and interactions that feel comparably responsive.
Browsers are everywhere, but competition continues
Russell traces how browser teams improved security and extended the web’s reach from desktops to watches, cars, and televisions. He explains why the open web depends on bringing broadly available capabilities across operating systems, then describes how Project Fugu and progressive web apps helped close gaps. His conversations with teams often uncover slow experiences even where browsers already offer the features they need.
When faster hardware stopped being a given
Russell recalls how faster processors, more memory, and better networks once made existing software faster without much intervention. He traces how multicore CPUs, thermal limits, battery-powered devices, and less reliable mobile networks disrupted that pattern. Rising prices and longer replacement cycles then kept older hardware in use for longer.
The phone your customers actually use
Russell explains how affordable Android phones came to dominate worldwide shipments and why a premium iPhone can hide the costs users face on slower hardware. He uses the Galaxy A24 as an example of a practical test device and credits Apple’s large processor caches for part of the speed gap. He argues that the web compounded the problem by carrying desktop-era frameworks onto phones while native platforms reset their expectations around mobile constraints.
A slow shopping form and a table full of iPhones
Russell explains that his consulting stories draw on confidential engagements and may reflect survivorship bias. He describes how the push to put progressive web apps on home screens and in notification trays brought the Chrome team to a European utilities comparison site that had rebuilt its main form as an Angular single-page app. When the team saw the form on a modest phone throttled to 3G, Russell asked the executives to show their own phones and found that every one used an iPhone.
The retailer that shipped the same dependencies repeatedly
A large US retailer rebuilt its fast storefront as a React single-page app with server-side rendering and put separate teams in charge of individual screens. Russell uses an archived RCA storefront to show how familiar the underlying shopping flows were, then explains how the rebuild complicated measurement and let teams ship separate copies of React and other dependencies. A manager privately told him that the new architecture was costing the business heavily.
More than 200 requests for a mostly static page
Russell opens the network waterfall for a rebuilt enterprise landing page and finds a loading spinner, more than 200 requests, and 10 MB of uncompressed JavaScript. The design system puts around 1,700 static SVG icons into JavaScript as React components on the critical path. The page opens more than 40 connections and starts with three copies of React, which can grow to seven as users navigate.
The memory cost of runtime CSS-in-JS
Russell compares how browsers parse plain CSS with how runtime CSS-in-JS can turn JavaScript objects into new strings that the browser then parses as CSS. He distinguishes build-time approaches such as StyleX from the runtime approach he criticizes and connects the extra allocations to rising DDR5 prices. He points viewers to Life of a Pixel to learn how browsers turn markup into pixels.
Public services, progressive enhancement, and the veil of ignorance
Russell compares California’s help portal on a slow Android device with an equivalent UK Government Digital Service experience and makes the case for progressive enhancement as engineering policy. He applies John Rawls’s veil of ignorance to ask what developers would build if they could end up using it under anyone’s conditions. He closes by urging teams to measure well, learn the platform deeply, and make speed, accessibility, and progressive enhancement explicit when prompting coding agents.
Q&A on whether rising memory prices could change priorities
The host asks whether rising RAM prices could help teams take performance more seriously. Russell argues that higher hardware prices may delay upgrades even for affluent decision-makers, making them more likely to experience the slowness their users already face. He leaves open how much that shared experience will change engineering decisions.
This is this is a person that, I I think many of you are quite familiar with. He's been involved in, an awful lot of things very central to what we've been talking about today and just, the web and performance in general. Alex Russell has been described to me as the moral backbone of the web which I think is pretty fantastic if that's one way to be known.
I think that's that's pretty great. But he works, this person actually does work in Microsoft so I'll get that right this time. He's partner program manager, he's worked on all sorts of things, all sorts of standards, service workers, all kinds of, things that have too long a list to name and he's already here to talk to you about it. So I'm going to turn this over to Alex.
Thank you.
Thank you. Thank you again. Are we... Yes. Thank you again. This is intimidating and imposing in equal measure. This venue is incredible, and the people in it are much more scary than... And and create a pose that I don't think I can fill just because the density of incredible people who make the web work here is like nothing I've ever seen.
Right? Maybe since the last one of these. This is probably the best conference for this bit of the web anywhere in the world, and I would go a little further and say it's probably the best conference about the web, period. So congratulations again, and thank you to the program committee for both inviting me at the last minute.
And hopefully, my last minute topic will meet the moment because what I wanna do today is to stop doing this. I would like to stop doing performance work. Not entirely. It's great. It's wonderful. This is an incredible community, but I don't do performance work because I like doing performance work, although it is incredibly satisfying when it goes well.
I do performance work because, I work on a platform, and platforms are competitions. And I kind of do a strategy job, and then there's technical work that falls out of the strategy. And so what does it mean that platforms are competitions? Well, it means that if someone who is working on a native app tells you not to worry your little head that they're going to go and ship the native version of the service that you're working on because, oh, users kind of like it better, and there will still be the website, What they're telling you is that you are about to be obsolete.
Right? And when native platform providers make substandard browsers that are trying to keep a large advantage for their proprietary platform rather than allowing the web to show up and then commoditize and then lower the price and then enable interoperability, that is a threat to the platform. Platforms are competitions. Get it straight.
Don't get it twisted. So when people tell you that it's fine for, for instance, time to be spent on the desktop on the web, but maybe not on mobile, what that means is they're fine with the web losing. And I don't think that's fine because I want the web to win. So that's that's what I want. I want the web to win, and so I think there are necessary preconditions for that to happen.
First, we should note that we need all of these, but individually, they don't get us where we wanna go. We have to have the confluence in my analysis to get to where we wanna be. We need the web to be everywhere. That is to say, for it to work, we have to have distributed clients. We have to have software on devices that can run the web because the web is not the program you download, you download a browser, and then you go to the web.
Right? So you have to have a browser. You have to have a runtime on the device that can enable the web. This is a downside of meta platforms in general. So Flash required you to have one. Java applets required you to have Java installed and then do some care intending of how, you know, up... You're gonna upgrade the Java runtime to avoid the next bug.
All of these things have to have reach, and then they have to be safe because if they're not safe, then you're not gonna trust them or you're gonna remove them and then that endangers their reach. So reach is a prerequisite for a metaplatform like the web. The next thing that they have to have is they gotta do enough. Right? If you're gonna sit down and invest your one and only life or at least a fraction of it into making a program for a platform, because that's what we're talking about.
Right? Languages aren't platforms. Languages and their runtimes give you something that you can do a little bit of math in. Platforms do all the rest of the plumbing that lets you talk to disk, talk to the network, talk to the screen, talk to all the other devices. That's what a platform is, at least on the client side.
And so we have to be able to do enough of that stuff to cover the use cases that most people expect that other platforms or at least your competitors as a platform are going to try to be able to enable. Now remember that the web requires that we do this safely, so there's a tension there. And lastly, we have to be in interaction class parity.
We have to make it so that when you tap on a button in a native application for whatever platform we're talking about as the competitor versus the web, maybe we're not as fast. Maybe we lose a millisecond. Maybe we lose five milliseconds, but we have to be in the same interaction class. We can't be blowing out, every interaction in native feeling like butter and ours feeling like molasses.
That can't be how it goes. This cannot be the basis for a competitive contender. We can't be in the running as a choice for developers if users don't experience our platform as feeling good. Now there's gonna be a lot of bad stuff coming up. Sorry. But there is some good news.
First, the web had its bad old days. Right? We we did this in the nineties and early two thousands. We made a bunch of really insecure browsers, And then we put them on a lot of desktops, and then we got rid of them. And that was a long and slow and painful process, but it created a race to the top, and it disciplined browser teams such that they think about security first and foremost all the time every time. And trust me, as someone who's trying to expand the capacity of what the platform can do from inside of a browser team, they really mean it.
It's it's intense. Secondly, we more or less got wide distribution. Browsers run on watches. You can actually run browser runtimes inside of most of the smartwatches on the planet today. You see them in cars all the time. Those are terrible. Let's not talk about them. I've seen them in fridges.
This also seems like a bad idea, but what it does is it enables people who are building software for these platforms to be able to take a single low cost bet on an interoperable standardized open platform to distribute most or build most of what they need, and maybe there's some plumbing to do at the if you look inside of your television and you go to the YouTube app today, that happens to be a browser.
That is a runtime for HTML. Now they ship their own browser inside the app. It's called Cobalt, but it's it's kinda wild. And I expect the browsers to run on everything, at some point. Okay. So this is now a complex ecosystem. Browsers and the web have grown to such a scale that people are spending something north of 60% of their time on desktops, at least, in a browser or in a browser enabled application, and most of it's in the browser.
They're getting more than 70% of their jobs that they need to do done on desktops in the browser. That's incredible. That's success. That's what it looks like to displace the proprietary application ecosystem and to to win. Now that doesn't mean that we have won forever. Right? No platform earns its place in perpetuity. There are probably more mainframes operating in the world today than there were in 1985. You're probably not a mainframe programmer, at least not knowingly. And what that means is that generational platforms never die.
They just go into remission. They end up being obviated. They never become the locus of renewed investment ever again except as some sort of a, maintenance burden for somebody else to take care of. And so there can grow a relevance gap. That is to say, we don't maintain capability, if we don't maintain speed, if we don't maintain reach, we can stop being relevant.
And what you'll see is that many of our competitors will be shouting about features that are only available at the top end. They're only available for a single operating system, for a single subset of devices, and they're going to try to take that proprietary feature. It's almost always patented and never has a standard written about it, but they're gonna try to take that proprietary feature and use it to transform expectations about what computers should do at the leading edge.
And that's not where we play. We play at the trailing edge. We've... We are are attempting to ensure that the capabilities that are inherent in our open interoperable multi operating system standardized platform can meet most of the needs where most people are, which is to say on the other side of something becoming available across multiple operating systems with APIs on all those operating systems.
That's where we commoditize. That's where we play. And if we're boxed out of it, then we end up in a bad place. Now would like to be spending most of my time working on things like Project Fugu, which I helped lead when I was at Google. And, unfortunately, when we go talk to teams and we try to figure out what they need to do, we want to go to them and ask them, hey, you've got a cool website.
What what are the things that you would like it to do that it can't do today? We hear sometimes about these kinds of features, and then we go and sit with them and we try to understand what's going on. And frequently, we hear is that they've... There's a capability gap that they would like to close. And if we can close it with them, that's great.
But a lot of the times, we wind up seeing strategic problems in their attempt to deliver into the market in a competitive way that have nothing to do with capability. So we can close capability gaps. We've had big bursts of moments where browsers have decided to get better at doing stuff. Right? Like, we we did this with PWAs.
We did this with push notifications. We did this with Project Infugu. We've done this in all kinds of other areas, many of which people here are responsible for, and I thank them all. And there is bad news on this front, and that is, of course, the iPhone. So if you care about the ability for us to be capable enough to compete in the future, I would suggest that you go and look up OWA.
Go support them. Volunteer with them. They are doing, the deity's work to ensure that we actually have an open and interoperable ecosystem in the future, specifically on mobile where today that is not true. And that just leaves us with a thorny problem of performance. How hard could this be? Right? We've had the web, but it grew up on computers that were... Had a 128 megabytes of memory and maybe 50 megahertz processors to start. Right? We should have this in the bag.
We grew up in the darkness. You just adopted it. Okay. At the same time, those of us who built the web grew up in a world of luxury expanding out before us every year, relatively speaking. Every year, we got more transistors. At the time, that turned into faster CPUs, faster programs.
The same program we compiled or run on the new operating system the next year would go faster because someone got faster hardware. The transistors got smaller. That's how we got more of them, and that turned into just lower voltage, lower wattage overall for the same amount of compute or the same amount of wattage for a lot more compute, and we just went faster. We went faster and faster and faster.
And we got a lot more memory at the time. This is, by the way, this is log scale. This is this is an incredible trend. We have been getting more memory since the sixties, predictably, almost every year to an incredible degree. And I think this has created in our ecosystem as front end engineers, a belief, or certainly there was a belief going into last decade that this future would expand out before us.
Right? We got faster networks too. That stopped. We went to mobile. Networks stopped getting faster. They they started getting more unreliable. And, on the CPU and memory side of things, we had a bunch of wobbles in this narrative. We had a bunch of earthquakes that sort of showed up, we kind of dusted ourselves off and proceeded as if nothing happened.
The first, of course, was the switch to multicore CPUs. We ended up not being able to take the same single threaded program and run it every year on the next new hardware and have it go faster because the the the chips... The the the transistors were just too far away. So we we had to do something else, in chip design, and that ended up being multicore.
And multicore required us to reorient where all of the program went. We had to rebuild what it meant. On the browser side, we had to thread the browser. We had to make it multiprocess. These were opportunities to go faster or to to take advantage of more silicon. We got more transistors every year, but it wasn't on a single core. It was in many...
Distributed across many cores. But the downside of this, of course, is that most of those cores are now dark, thanks to thermal throttling. And this is exacerbated by the transition that happened to mobile, which is to say, mobile made it so that all of those cores were no longer plugged into the socket. They were plugged into the battery, which is sitting in your pocket.
So that means that suddenly, we wanna spin down those cores or run them at the lowest frequency we possibly can. So so schedulers and governors ended up being the new sheriff in town. They ended up being the thing that determined the programming capability or the performance capability of our programs. And for many years, it is my belief, looking at the data, that CPUs basically stalled or got slower if you looked at the median. Right? As we got so many more mobile devices, we stopped going from a world of ever improving desktops to a world where the expansion of mobile sort of tipped things over, and the median device that could run the web stopped getting faster.
Now that has improved a little bit recently. We could talk about that. But, tough times, in in the middle of the last decade. And, of course, then we got inflation. So everyone was at home, and they all wanted to play the PlayStation or, you know, whatever you're playing on your PC. And... Or they needed to be on a Zoom call or they needed to be on a Chromebook to go to school.
And so suddenly, we all started paying a lot more for our devices. Yeah. This turn... Pricing pressure turned into a series of market effects that caused device lifetimes to elongate. In addition to hardware just getting better and sort of staying good enough, we ended up in a place where now where the average PC used to live something like four years.
Now it lives between five and seven years. The average phone used to live something like eighteen months. Now it is north of 24. So we are in a place now where hardware lasts longer, which means it doesn't get faster because it's the same thing. And in many cases, it gets a little bit slower for various reasons. We can talk about them, but lots of reasons.
And now we're in a brand new shock. So once every few years for the last ten years, we have been hit... Getting hit and hit and hit again with our expectations of the cornucopia of new device processing power and memory being available to us every year, and that has just stopped being true.
But did we adapt? So early on in the trajectory of mobile, we ended up in a world where mobile devices were luxury goods carried by fancy people. Right? If you had an iPhone, you were wealthy, world historically speaking. If you have an iPhone today, you are still wealthy, world historically speaking. But that's not the big story.
The big story is very much like that capability gap slide where the thing that really matters to the world is not what rich people have in their pockets because they're rich. Right? There's just not very many of them definitionally. That's kind of the definition of being rich. It's relative to everyone else. Right? The big deal is that Android and low end Android specifically ate the world. Mobile is now most of the devices that can run your web page, and mobile devices are mostly mobile, and that means they are mostly cheap, that means they are mostly slow.
What does that mean in practice? It means that as device length, life length continues to extend, we see relatively flat shipments every year as most of the world has gotten to saturation. So if you previously had a flip phone, today, the odds are very high that you have a smartphone. It may be your first smartphone, but you have a smartphone.
The $100 phone, well, until this year, was a reality, and that is a $100 smartphone, something that can actually run a real version of Android. But iOS, which is where a lot of us are... Who's who's got an iPhone? Yep. Okay. So that's more than 50%. I'm gonna go with 70, 75%. IOS has never been more than 20% of device shipments worldwide at any point in the last decade, and that is a stable pattern.
What does that mean? Well, that means that your fast phone is not real life. That means that when you go to buy a phone, you have been buying a luxury device. That device has been going up in price, actually, in terms of both nominal and stable dollar terms over the last decade. You have probably been paying a little bit more every year for your luxury iPhone. The rest of the world, though, has been, keeping it tight at about the $250 price point.
That is where the average Android is being sold today. Average. So your device, you are pay... You are getting what you pay for is what I'm trying to say. Good news. You're wealthy. You have a really fast phone. And if you've heard me talk before, you know the the shtick. This thing, this a 24, is what I would probably suggest something like this for your testing.
Still a four g device because five g is not where most people are. Even if they've got the five g radio, network coverage, they may not have a five g radio in their device because, again, device lifetimes are elongating. These devices, these things that you would not deign to carry, are where most people are. So this is the target for your work.
And a little bit of a sidebar. The reason that your iPhone is so bloody fast is that Apple has done a really good job, and you will barely hear me credit Apple with anything. But Apple has done a really excellent job in chip design, primarily by taking the cash that you give them in euros and turning it into cash on the device in terms of millimeters squared of die space. That is the primary way in which Apple has, made your phone so dang fast, and it shows.
It's it's an incredible chip. And only in the last several years have any of the Android SoC vendors, even at the very highest end, started to respond by improving the size of the caches on their devices. Alright. Where were we? Okay. Back in twenty ten, ten... Twelve, as Android was sort of struggling for relevance and many of these sort of web based phone things were starting to happen, the iPhone initially had a web based platform, but it was sort of kicked to the curb when Apple realized that they could make a walled garden and make a lot more money that way.
But the rest of us who are making websites and tried to go through this transition brought the stuff that we were using before with us. It was jQuery at the time, and then it was Angular, and then it was React, and then it was all kinds of other stuff. But the web was the only platform that decided that in this transition, it was going to attempt to bring the desktop to the small device in your pocket.
And if you carried an iPhone, you may have been insulated from the worst results of that choice. You may have been on a significantly faster network than your peers. You may have been on a significantly faster device than your peers and may still be. And everyone else, who was our competitor as a platform, said, that's nuts. Why would you do that?
We absolutely have to start over because we're not gonna fit the kinds of programs that can run well on these devices, in the kind of space that we would, be able to afford. So they did not take a macOS universal binary and run it on an iPhone. You could not take a Java Swing app and run it on an Android because it was just too big, too slow. Like, the the trade offs were wrong, and so the platform designers of those platforms said, we need to reset expectations so that we can guarantee that the programs that people write will fit inside the constraints that will make the programs that people get on these devices feel good. We didn't do that.
Right? We brought Angular and React and all of our desktop and Ember and all of our desktop nonsense with us to the phone and tried to serve it over increasingly unreliable networks with higher RTTs than we had experienced in the year before and just hoped it would work out. We just trusted that it would work out.
I have bad news. So come with me to story time. I normally don't like to give this kind of talk, and I'm surprised that anyone would let me. There's a lot of reasons for that, and I'll go to... Get to a few of them. The first is that conference organizers don't want war stories talks because you end up with a old man yelling at cloud vibe most of the time. Secondarily, it's difficult to give a talk like this because many of the traces and many of the partnerships that I'm gonna talk about are private.
Right? They... If you were a consulting engineer, you were a consultant, which is to say you keep the confidences of the people you consult with. And so we're gonna be in deep in trust me, bro territory. And I want to apologize for that upfront. I won't be able to show you most of what I've seen. So take the rest of what I'm about to say for the next twenty minutes with a huge grain of salt.
And if you think I'm full of it now, you will probably think that at the end, and I will not be able to dissuade you of that. Okay. We're on the same page. And I think, lastly, it's quite difficult to give, a war story talk because it may not be actionable for you, but I think this one can be.
Okay. The stories you are about to hear, are actually instances of individual consulting engagements, I have been a part of over the last decade, and I have done more than a 150 of these with various teams and various guises with various counterparties along the way.
And the names, will not be disclosed, except for one exception at the end. We... Fine. There is a lot of survivorship bias, though. So it may be the case that I'm bringing to you what seem like the worst possible instances of what you could do on the web. Trust me, they're not.
But it might seem that way because maybe I'm just a glutton for punishment. Maybe I just attract terrible partners. Maybe I just wind up looking at all the worst stuff, or people send it to me. Maybe you, one of my former colleagues, sent me a particular trace and said, hey. Did you see this? So it could also be the case that you should not trust me because maybe I have seen a non statistically representative sample of the web. Okay. Alright.
So back in 2015, we had just launched Progressive Web Apps. Right? If the statistical... Sorry. If the competitive landscape requires that we be capable enough, one of the things that we heard over and over and over again from web developers was that we had to be on the home screen and we had to be in the notification tray.
And if you couldn't do those two things, if you couldn't be in the tap and swipe ecosystem, then you couldn't play. Your platform did not matter if it required launching a browser and then going to a website, typing on a devil's keyboard through molasses to try to get to a URL, whereas your competitors were able to ask for a one time install and then have an icon on the home screen that you just tapped.
Otherwise, you just weren't in the game. Okay. So on the back end of launching Progressive Web Apps, we started working with partners. We had previewed them in 2014. And if you could make a URL that the user could get to once, probably by clicking on a link, you could convince them potentially to add it to the home screen, and then it would show up almost instantly.
It didn't take nearly as long as installing an app did. And when you tapped it again, it would launch full screen. It was in your task manager. Life is good. Okay. So we started talking to lots of partners. We started talking... You know, through the Chrome team, we started talking to lots and lots and lots of people, and we had great partnership teams working with us.
The developer relations team on Chrome is second to none. They did outstanding work. And so we got into the room with lots of people that I'd never talked to before, which was great because because we wanted to learn about their problems. So one of these sites was a comparison shopping site. Now this comparison shopping site was, for utilities. I won't say more than that.
A utilities comparison shopping site in Europe. And they had a largely web based business. They had been available for years, and, they had a brand that people trusted, and they knew to go to the URL if they were going to try to shop for the next version of of their current service. And so, of course, their customers are price sensitive.
We're not talking Prada handbags here. Right? And so what that means at the limit is that they are probably the same sorts of folks who are economizing in other areas of their life. They are the folks who are most likely to be on lower end devices or on older devices, and that means that their one big form is going to be experienced on slow Androids often in rural locations. Right? This is not the hardest target.
Now we're talking European networks. These are great networks, relatively speaking, even in 2015. But they were building what they described to us as effectively one big web form. Right? So how did they build it? Why why were we talking to them? So lots of things we wanted to tell them about the benefits that making this thing a PWA could bring to them, potentially, for for instance, for push notifications.
So they had decided recently to rebuild as a client side rendered Angular SPA. Now this is... I tried to explain to some executive recently what some of these words mean, some of these acronyms mean. And trust me, it requires a lot of context that I'm grateful and sad that you all have. So in addition to what you would imagine the Angular SPA did, there were, of course, the usual barnacles of third party trackers and all the like, tied to a relatively verbose protocol speaking to the back end. So every time you go back and do some validation, it's just very chatty.
And, of course, confirming our hypothesis about their market position, a lot of their users were on Android. At some point in the conversation from this team that had flown to Mountain View and were being shown around what what was a very strange environment to me. They sort of... Google had built, we sort of all had our desks in these little hovels that we sort of, you know, made messes in and tried to clear out of it, in time to catch the bus back to back to the back to home.
If you've seen The Intern, it's kinda like that. Google had made this version of the Google campus that was kind of like hyper real for people who visited. So it was like our mini kitchens, except they were nice and they still had the the nice snacks. And this was sort of the the demo center. So we get called over to this, and we sit down, and we're around this big table.
And at some point, one of the managers says to me, as we were just just showing them their own website on a physical device, a relatively modest phone throttled to a three g network, which at the time was the appropriate counter counterbalance to Wi Fi. And this executive said, I knew those engineers were up to no good, and I just had to stop the conversation and ask, okay.
Show me all of your phones. So they just picked them up, put them on the desk. It's all iPhones. No one in the executive team was living like their customer. No one understood what it meant to be in the shoes of their users. Their engineering team made the choices that they were allowed to make. They had been sold a pile of goods about which thing was popular and therefore would be successful for them, and it was, of course, a mistake. The SPA thing was, of course, a mistake, but the management blindness is what caused the problem.
It wasn't the engineering choices. The engineering choices were downstream of a management culture that didn't value what the customer felt. We actually do have a product management crisis in our industry, in that we have a lot of product managers who don't actually manage their product. Our next vignette is a shopping site. This is a few years later.
I think it's 2017. And this is a very large business. It's US based. They had been on the web for a very long time. They were growing rapidly and trying to grow much more, and they had a long running and relatively high performance website. They were selling to relatively...
Folks of relatively modest means or folks who were trying to ensure that they were getting a good deal all the time. Their brand was a value brand, and they had rebuilt very recently again as an SPA. So in this time, we drove over to them. They were in the Bay Area, and, they were very proud to show us their brand new React based, SPA system, which, because React could be slow, had SSR.
Okay. You know, big thunder in 2017. They had decoupled their dependencies. They decided they were gonna have the setup of their organization where there was one... Basically, one team per screen. Right? This this could make sense from a resource allocation perspective. I'm I'm not gonna try to opine about their resource choices there or their organizational choices.
And they had, at one point, a very strong metrics group. Now they had just introduced a bunch of variability into the entire situation. So a lot of folks were sort of wondering if the metrics still mattered or if they were trying to rebuild them because the login that you get from the client side is actually much harder, especially back then, to try to make relevant or comparable to your previous experiences because you could conceptually do everything with an HTTP post. Like, everything you do on the web, every time you click a button or tie...
Type a key, that could be a full form refresh. Right? Like, we could do that for everything conceptually. We don't. But the metrics that they had built in that old world were sort of hard to to wire back up to the new world. Now this is a shopping website. And I knew something about shopping websites because something like twenty years prior to that, I had been an intern on rca.com where we did the crazy, crazy thing of trying to sell televisions on the Internet in 1999. And this is rca.com from the Wayback Machine, and it looks this way because nobody in the world had a screen that was something like lighter than 480 pixels, more or less, give or take. And so what you see here in this in this old, old, old website from '19...
I think 2000, all the way up to 2000, is a left rail and a top nav and a logo and some stuff and a search box and some marketing because that's what every single shopping web page on the entire freaking Internet has always been and will always be. Every ecommerce website is a landing page with a search results page, which does have filtering.
Your filtering is not special, it is not new. It has product detail pages. Those product detail pages have nothing in common besides the logo and maybe a little bit of the left nav with the search results page or the home page. There is a marketing and category subset of this, which no one likes to talk about because the marketing team is crazy, and there is a whole basket in checkout flow, which is left to some poor sod who knows everything about it and will yell at you about Mastercard as long as the day.
Okay. So the technical problem was pretty obvious if you had been following along. Any... Anyone got a guess? Yeah. JavaScript. Yes. Correct. So they had been told that they were going to be building an s... That that the architecture was gonna be an SPA.
Right? And so they built SPAs. They built SPAs. At some point, after we got done meeting and I started asking questions that were uncomfortable, like, why is this in the bundle?
Because no one had looked. This is very common, by the way. I I I don't know if you've had this experience, but trust me. When you sit in a room with people who have got a slow website, the first thing that you will pull on will pull the rest of it with you, that meme of the kind of, you know, door opening and everything falling out.
That is every conversation. There was no sharing. There was no TTL. This huge set of bundles, they didn't share a version. They didn't share a version of React. They didn't share a version of any of the utilities that came with it. They were all in the same repository. They're all being iterated together, but they needed to ship quickly.
They needed the agility. The agility was the thing, and so they all shipped their own copies of all of these dependencies, and it was a disaster. The manager who pulled me aside after that meeting was... They whispered, I think is the best way to put it, and they were telling us, that the reason that they brought us in was that they couldn't tell the team that the new architecture was losing them more money than any of us would ever make in our entire lives every month.
The performance of JavaScript culture as a no merta is so strong that even inside of a business, they were afraid to lose the talent that was losing them money. Right? They were they were nuking their business for the belief that JavaScript was going to save them. What are we doing?
Fast forward, many painful years. And, now I work at Microsoft, and we were working, with a team, and we had made a bunch of really great improvements. I wanna be very clear that this is a good team. They they are they are strong engineers. They want to do the right thing. Many of the teams that I've worked with, including the team that I just mentioned, they wanna do the right thing, we were able to make large improvements.
So the consulting thing isn't isn't just all hopeless bullshit. Right? It can work, you can you can do things that are good for people. That's great. But I was having a conversation with a manager, and and they said, you know, I know you've been frustrated. You know, we've rebuilt this thing, this this page that you you... This landing page that you were so frustrated about.
It's gonna be much faster. We've got a whole new architecture here. It doesn't have all that gunk that you were worried about. We're not preloading these things. You wanna take a look? So it's a landing page. And the top is... You know, it's a relatively semi static section with your name and a little widget at the top to let you configure stuff.
And then it's got the product logo, and that's pretty much it. And then there's a middle section, which is fully static. And then there's a bottom section, which is stuff, which is dynamic, right, which is actually about you and about your logged in session, which seems like it should come back pretty quickly, but I was surprised to find out that this experience happened to feature a loading spinner upfront. Why does a landing page with relatively static content have a loading spinner? You might wonder.
I might wonder. And I thought that I was going to have to find a way to pixelate this waterfall, and the good news is that it's so small when you present all of it here that I don't think anyone's gonna be able to zoom in and see what this was. This is more than 200 requests for, again, I cannot stress this enough, a relatively static piece of content.
And and this is most days in this sort of work, and I know many of you have had the same experience. Because if you pull up the trace, what we see is that, again, we are not passing the is this web page smaller than an image map of the content test. Right? Because that that is the lowest bar that you can...
HTML is a compression format. CSS is a compression format. If you understand them to be compression formats for UI that yield a very large amount of UI per kilobyte for the stuff that HTML has in its basic semantics and the text, which is actually quite complex, but we do a very good job of laying out these days, 2.7 megabytes is like an eight k image in WebP.
None of the clients are on an eight k monitor. What are we doing? This is 10 megabytes of JavaScript uncompressed. Now the good news is they're getting relatively high compression ratios, so good work. The bad news is all the rest of it. So this is, again, a US based company.
They're making enterprise software. People are really using the web stuff. The web stuff is how people get to everything in enterprise. There are other applications, but you gotta work hard to get users onto those. And they had built an MPA ish thing. Why did it have a loading spinner? It had this static ish header. It had this dynamic document list at the bottom, but it was pulling in tow React and the enterprise design system based on React.
Now... And the enterprise design systems are not necessarily a bad idea. They take the huge number of potential axes on which you could differ across your team in terms of opinions and practices, and they boil them down into a single, hopefully, best practice. I hate that phrase, but we're gonna use it here in air quotes. Now design systems are also a risk because they could bake into this single prescriptive piece of guidance the opinions of people who don't know what they're doing.
So as a vignette, what you're looking at here on the left are effectively a bunch of SVGs, and I I need to ex... Explain that this is not unusual. When you start to rip open a bundle like this, a two megabyte, 10 megabyte bundle, what you will often see are things in there that no one expected, like 1,700 icons that are all static, that are encoded as SDGs, but they're all embedded in JavaScript, and each one of them is a React component.
You can't just get the text of the SVG. No. No. No, sir. You have to blow all the memory that it takes to cons this all back up into a React component, which is nuts, and it's all in the critical path. And that sounds bad, and you may be asking yourself what else could possibly be going on, and it's everything.
Right? You pull on one thread, and suddenly it all comes with you. This is not unusual. If you read the footnotes in my blog posts, you'll see that I read the bundle, so you don't have to. And this is the same stuff that happens every single freaking time. Because what we have decided to do in the front end community is decide that the JavaScript will save us.
And if it didn't save us yet, we just have to JavaScript harder. I was having a conversation with someone earlier today, and they were telling me about some work that was about Next and Vercel and said to me, you know, well, maybe it's not worth giving up on them. And I said, well, they've been wrong for ten years. Why is it gonna be different now?
And I think this is an attitude that it's worth attempting to take on board a little bit more aggressively because persistent wrongness is forgivable when correction leads to correction. Right? Like, if you're working with people who are operating in good faith, you expect good faith in return. And when you don't get it, eventually, you need to time out.
Alright. Now there were, of course... I didn't show you the the connection side of the waterfall relevant to our last talk. So there were more than 40 connections being spun up in order to serve this. Again, relatively static, relatively simple set of UIs, and there were multiple connections to each CDN.
Yes, that means there was more than one CDN. Okay. Now you might see that see that and think, well, this is pretty bad. And I bet you have a pretty cut and paste... Cut and dried answer to how many copies of React should there be in this React MPA. Anyone got a guess?
None. Yes. The correct answer. Now any guesses for how many copies of React this thing did load? Three. I heard 24. That's definitely... That's that's that's... Have you... Has anyone seen 24 copies of React in a single web page? I I don't... I I believe it's possible because this one had started with three, but if you clicked around a bit, could get yourself up to seven.
And then, of course, it did pull in the enterprise design system, which uses CSS and JS, and we have to talk about CSS and JS. And to do that, we have to go back to Christopher Shadow's initial talk introducing the concept of CSS and JS in 2014. And the encouragement here at the beginning of this talk was to say, well, this might sound crazy, but keep an open mind.
So it's important to understand that when we're talking about the efficiency of turning CSS into actual rendered output, we start with the the markup, and then we take the memory. Just... Let's just focus on memory for a second. We take the memory, that we need, and we've got the memory allocation of that string, which is basically the inner text of the style element or what...
Whatever link tag we pulled it through. We parse that, and so there's parsing overhead. And we turn that into CSS style set... Style rule set values. And those rule sets are relatively efficient in memory inside the runtime. They're big, but they're... They are what you sent down. Now if you do this in CSS and JS with a runtime...
And by the way, there's an entire taxonomy of different CSS things. If you're using style x, this doesn't apply to you. That's actually the good way to do it. It's maybe the only good way to do it aside from using CSS that comes down, which is used, with adopted style sheets and constructible style sheets inside of a web component.
But that's not what people are talking about. When they say CSS and JS, they mean the nasty stuff. They mean styled components. And so you have the memory overhead of a JavaScript string, which then gets turned into all the intermediate representations of that JavaScript because what you're not doing is sending down it as a... As the rule set as a string.
You're sending it down as an object structure, which then has to be parsed and turned into a series of objects, which then gets turned back into a string by the runtime, which is a new string, which then gets parsed, which then gets set to rule set values. Just from a memory perspective, this is ridiculous. Now we care a lot about more more about this now as people who are wealthy, relatively speaking, because suddenly the memory is biting us, not everyone else.
This is the price of DDR 5 over the last couple of years. It's going up, and by the way, that's a log scale. So it's actually like this. It's five times higher than it was two years ago, and it's more expensive than it's ever been commercially. And, of course, we're all trying to find whoever made the DDR five this expensive. Let's not talk about...
Too much about that. But what I wanna leave you with is the browsers are virtual machines, and they are virtual machines that are very, very, very freaking weird. Their job is not to do JavaScript. JavaScript is a sidelight. Their job is to turn markup into pixels. Anything you do in the middle with JavaScript is taking the reins and saying YOLO. That's JavaScript.
And you have to keep in mind that anything you do in JavaScript is gonna blow up in terms of memory. So if you care about memory, and we all should and we all... We should have, but now we do again too, Remember that it's very expensive. So when you hear things like this, you get to tune them out.
You get to say no. CSS and JS was always nonsense. It was always bullshit. Those of us who worked on browsers told the folks who were working on this stuff at the time that it was nonsense and it was bullshit, and they kept going anyway. You don't have to pay attention to them. You don't have to take them seriously.
They don't know what they're doing. But they could. And the reason that I feel okay saying relatively aggressive things about them is that all of the educational material that we all need is now online. It's on YouTube. You can go get it.
Life of a Pixel is free. You too can get deeply in touch with the entire rendering pipeline and understand the pieces of how it all fits together. This can work. Every time you see someone try to bring CSS and JS into a project, you should understand themselves as a danger to themselves and others. Okay. Which brings us to the public sector, speaking of being a danger to ourselves and others.
If you've seen one of my talks before, you will know that I am very sad. And I am very sad because a lot of the results that we're seeing look like what we see on the left here. Now I think I showed some of this before. This is still the California government's portal for getting help, emulated on a four g network on a relatively slow Android device.
On the right is The UK's government digital service delivering an equivalent experience. How do they do it? What magic did GDS use? The answer is progressive enhancement. You heard so much so much incredible data, over the last two days about how and why multiple page applications are a better bet most of the time.
Annie's talk, other talks about how you can end up in a place where unless you have a very specialized need, this is the only way to build. And this is what you should boil into advice inside of your company to make this stick. Make this policy. So I have a lot more to talk about, but I don't have time.
So we can't talk about the gaming portal. We can't talk about the email client and what CSS and JS did to that, a Heisen bug that took months to find the answer to, and we can't talk about the chatbots. But we can talk about John Rawls. John Rawls, who knows who John Rawls is? Okay. One of the greatest moral philosophers of the last century.
You will have maybe heard of his work through the the phrase the veil of ignorance, and the idea is that John Rawls was concerned with the way in which we might understand if we lived in a fair or a just society, starting without the preconceptions of received religion or specific, educational attainment or some understanding of a a series of of laws.
What does it mean to judge a society as being fair or just? And the veil of ignorance is the idea that maybe you were reinstanced. You you start your life again in a random location in the set of people who are being born today, truly random. Would you be more or less likely at the end or in the middle of that to judge your life as having been lived in a just society?
Right? And the context in which we create, which is what we are doing when we make technology and give it to others, is the answer to that question. What are we making for other people? Because we have responsibility when we make web experiences. Now if we're just making a little toy for ourselves, go ham. Use React. I don't care.
Right? If you are making something for anyone else, what I'm begging you is to take your values to the job site. People say people, don't blame... Good... Sorry. Good workmen don't blame their tools. Well, good workmen don't bring shit tools to the job. Right? Bring your values with you. And especially since if you are in an organization that is using robots to do work, the cost inside of those organizations is perceived to be low to use them.
And I can tell you that we've had great experiences trying to use these same technologies to automate moving from worse tools to better tools. The prompts that you might write if you are working in these sort of agentic flows are a carrot that is waiting for you to type your values in. And when you type your values in, you get better results out.
When you say, want fast results, I want accessible results, I want progressively enhanced results, the robots will give it to you because they were trained on the entire web. It's up to you to direct them to which part of it you want them to pattern off of. They are designed to try to please you. They are word guessing machines trying to please you.
Give them a reason to please you that ends up in a better location. Okay. I know I'm out of time. I'm begging you to care, to measure well, and to learn the platform deeply. Thank you.
Alright. Thank you. That was absolutely wonderful. I also feel deeply seen and attacked by the... By this.
I hope love
the company Chewy. If you know them, I hope you never look at our site.
Everything can be fixed. Everything can be improved.
I I can only hope to bring more of that back to my team. So we have time for one question and I, there are a couple that were submitted. I think you've sort of answered Marco's question. I don't think AI is really going to replace front end devs. We still have to bring our values to it. I think that was a good prompt.
We still have to know that. The one that I think is really relevant is Christian was asking is Ram Geddon, something maybe a blessing in disguise? And and I'm wondering, if... What's your take on that? Is this something that is maybe a moment that we could use to our advantage for good?
I think so. In part because it's doing the thing that many of these other discontinuities didn't do. Many of the folks who are wealthy were insulated from previous occurrences of disruption, at least in part because they're wealthy enough to sort of ride it out. Now the five x price increase in RAM, it's hitting SSDs. It's gonna hit, CPUs shortly.
Those cost increases are gonna cause even wealthy people to delay purchases, and that is gonna show up both in the lived experience of the folks making decisions as well as people who are the... Or in the data even for folks at the high end. And so we're creating some solidarity between those two populations, everyone else and the people who are wealthy enough and working at technology companies, who have been insulated from it before.
That's been missing. Right? When it's come to performance in the past, a lot of my critiques have been that we sort of haven't given folks who are the decision makers a reason to understand that something is broken because it feels fine for them. And so now this might impact them a little bit. Now, the transmission mechanism is faulty.
Those folks are still wealthy. They can still buy their way out of most problems. We do have to work harder and I think that that's still an open open question for us as a community about how to do that.
I think that's a really solid prompt. Thank you. Thanks. Okay.
People
- Christopher Chedeau
- John Rawls
Technologies & Tools
- Adobe Flash
- Java applets
- Cobalt
- Project Fugu
- Multicore processors
- jQuery
- Angular
- React
- Ember.js
- JavaScript
- StyleX
- styled-components
Standards & Specs
- HTML
- CSS
- WebP
- SVG
- DDR5
Concepts & Methods
- Interaction class parity
- Progressive Web Apps
- Push notifications
- Thermal throttling
- Survivorship bias
- Client-side rendering
- Single-page application
- Server-side rendering
- Network waterfall
- Multi-page application
- CSS-in-JS
- Progressive enhancement
- Veil of ignorance
Organisations & Products
- Microsoft
- YouTube
- iPhone
- Open Web Advocacy
- Android
- iOS
- Samsung Galaxy A24
- Apple
- Google Chrome
- Government Digital Service
Works
- Life of a Pixel














