Nolan Lawson
nolanlawson.com · Personal blog · on HN since 2014
Nolan Lawson, a web developer and open source maintainer, writes about browser performance, web standards, memory leaks, and maintainer burnout.
What HN saysHN commenters link his posts on CSS selector performance, the fatigue of handling GitHub issues, and how developers feel about AI changing their craft.
133HN people shared it
53linked it in comments
171stories submitted
5.1Kstory points
3 months agolast shared
2014people per year2026
Most-shared posts
- 1Web SQL Database: In Memoriam12 people · 153 points · first shared 2014 · 21 comments on HN
- 2Safari is the new IE11 people · 753 points · first shared 2015 · 356 comments on HN
- 3Progressive enhancement isn't dead, but it smells funny8 people · 26 points · first shared 2016 · discussion on HN
- 4What it feels like to be an open-source maintainer7 people · 94 points · first shared 2017 · 20 comments on HN
- 5Fixing memory leaks in web applications6 people · 11 points · first shared 2020 · discussion on HN
- 6Style scoping versus shadow DOM: which is fastest?6 people · 8 points · first shared 2022 · 1 comments on HN
- 7Web components are okay5 people · 282 points · first shared 2024 · 356 comments on HN
- 8My talk on CSS runtime performance5 people · 115 points · first shared 2023 · 17 comments on HN
- 9IndexedDB, WebSQL, LocalStorage – What Blocks the DOM?5 people · 9 points · first shared 2015 · discussion on HN
- 10Memory leaks: the forgotten side of web performance4 people · 96 points · first shared 2022 · 20 comments on HN
- 11Why do browsers throttle JavaScript timers?4 people · 88 points · first shared 2025 · 38 comments on HN
- 12The cost of small modules4 people · 74 points · first shared 2016 · 24 comments on HN
- 13Why it’s okay for web components to use frameworks4 people · 6 points · first shared 2021 · discussion on HN
- 14The joy and challenge of developing for KaiOS4 people · 5 points · first shared 2019 · 1 comments on HN
- 15AI Tribalism3 people · 34 points · first shared 2026 · 26 comments on HN
What HN people wrote when they linked it
karakoram · 2026-03-24
Good Write up.
A great list for further reading for anyone interested:
https://blog.lmorchard.com/2026/03/11/grief-and-the-ai-split/
https://nolanlawson.com/2026/02/07/we-mourn-our-craft/
https://www.jamesdrandall.com/posts/the_thing_i_loved_has_changed/
nolanl · 2025-06-17
Author here. I actually did some research on CSS selector performance: https://nolanlawson.com/2023/01/17/my-talk-on-css-runtime-performance/
The TL;DW is: yes, class selectors are slightly more performant than attribute selectors, mostly because only the attribute _names_ are indexed, not the values. But 99% of the time, it's not a big enough deal to justify the premature optimization. I'd recommend measuring your selector performance first: https://developer.chrome.com/docs/devtools/performance/selector-stats
troupo · 2024-07-31
Yes, out-of-the box cross-platform is the main thing going for HTML+CSS. It's an undeniable fact.
As long as you don't do anything fancy on the page, accessibility is now great for HTML, too.
However, since it lacks everything that makes a UI useful [1], all the custom components everyone is busy re-making from scratch make the web a miserable place from accessibility point of view [2]. Much worse than native frameworks which often enjoy deep integration with the underlying OS's accessibility features.
[1] See the work by https://open-ui.org and the many, many, many UI components most UI toolkits take for granted and have out of the box
[2] And some of the work in the browsers made it worse: https://nolanlawson.com/2022/11/28/shadow-dom-and-accessibility-the-tr…
mnau · 2024-03-20
That's not the point.
I am not opposed to issues per se. The problem is dealing with the amount, it's exhausting. It's just too easy to make issue or comment on GitHub because of network effect. This sums it up pretty well: https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-so… (my workload is of course far smaller, but still it takes time and saps energy)
Yes, that issue has been opened for 4 years and I don't consider it important and neither did any of "me too" comments to do anything about it. At best I sometimes get drive by PR, which takes far more time to deal with than if I just did it myself.
sanxiyn · 2023-05-27
Amazingly, Firefox retained this performance edge over Chrome for 5 years, and will likely retain for 5 more years. This is really an amazing technological achievement.
> Firefox's Stylo engine is fast. Like, really fast. Like, so fast that, if every browser were like Firefox, there would be little point in discussing style performance.
https://nolanlawson.com/2022/06/22/style-scoping-versus-shadow-dom-whi…
pier25 · 2023-05-05
I agree but one important point to consider is the dev effort of making a proper SPA which is not a very common occurrence.
"The best SPA is better than the best MPA. The average SPA is worse than the average MPA."
https://nolanlawson.com/2022/06/27/spas-theory-versus-practice/
rektide · 2023-02-13
Nolan Lawson's recent talk on CSS Runtime Performance[1] show some pretty amazing styling performance wins for Shadow DOM. It's nice we can do more of this easily!
I think this should all work outside <template> tags. Re-remembering how they worked slowed down my comprehension some. The MDN article[2] was a solid refresher.
[1] https://nolanlawson.com/2023/01/17/my-talk-on-css-runtime-performance/
[2] https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_temp…
ramones13 · 2023-01-18
Nolan Lawson did a good write up comparing browsers - https://nolanlawson.com/2022/06/22/style-scoping-versus-shadow-dom-whi…
His talk here is also a great deep dive - https://nolanlawson.com/2023/01/17/my-talk-on-css-runtime-performance/
knowaveragejoe · 2016-02-09
Chrome might not be the best, but Safari is very far behind.
http://nolanlawson.com/2015/06/30/safari-is-the-new-ie/
Lazare · 2015-07-30
I think I'm more cynical about the process than you are. From my point of view, the process has been intensely political from day one, with rules honoured mainly in the breach.
The best retelling of events, I think, is this one: http://nolanlawson.com/2014/04/26/web-sql-database-in-memoriam/
Has some very good details. And it's certainly funny to see what was said during the discussion with how things turned out in practice.
Edit: I'd sum it up as "Google and Apple argue for a solution that will work on mobile; Mozilla and Oracle don't care about mobile, are weirdly obsessed with the idea that developers hate SQL, and use political manoeuvring to win the fight". (Oracle's role in this seems especially odd, but perhaps they had some longer term strategy in mind.) In any case, in retrospect ignoring mobile was a bad idea, and ditching SQL seems to have had no real benefit.
libraryofbabel · 2026-02-07
From a blog post last month by the same author:
> Today, I would say that about 90% of my code is authored by Claude Code. The rest of the time, I’m mostly touching up its work or doing routine tasks that it’s slow at, like refactoring or renaming.
> I see a lot of my fellow developers burying their heads in the sand, refusing to acknowledge the truth in front of their eyes, and it breaks my heart because a lot of us are scared, confused, or uncertain, and not enough of us are talking honestly about it. Maybe it’s because the initial tribal battle lines have clouded everybody’s judgment, or maybe it’s because we inhabit different worlds where the technology is either better or worse (I still don’t think LLMs are great at UI for example), but there’s just a lot of patently unhelpful discourse out there, and I’m tired of it.
https://nolanlawson.com/2026/01/24/ai-tribalism/
If you're responding to this with angry anti-AI rants (or wild AI hype), might want to go read that post.
spartanatreyu · 2022-04-06
Well it's kind of a long story.
The short version is that Apple overly focused on monetising their app store and doing everything conceivable they could get away with to push people towards it.
If you wanted to release an app for iOS users you needed to purchase Apple hardware, and a yearly subscription just to start developing an app. Then to release the app you had to follow Apple's rules which allowed them to take a 30% cut of all profits generated with your app. If Apple really liked your app, they could just make their own version and kick yours off the app store without recourse so they could keep the other 70% of the profits.
Meanwhile, users and developers could skirt around the app store by using Safari. This represented a direct threat to the largest revenue generating model that Apple had ever created. Apple needed to make sure that their ad campaign: "There's an app for that" always held true.
So Apple did what it could to indirectly reduce the effectiveness of Safari, keeping it behind what other browsers could do. They even made it impossible for other browsers to be installed on their devices by adding rules to the app store that mandated that all web apps had to be powered by Safari's web view. In essence, all "web browsers" on iOS are just reskins of Safari, warts and all.
Eventually this culminated in an article that basically became a lightning rod for developer's dealing with Apple's anti-competitive behaviour:…
vkou · 2020-07-07
In addition to Wil Wheaton's experience linked above, we have:
https://nolanlawson.com/2018/08/31/mastodon-and-the-challenges-of-abus…
https://hackernoon.com/mastodon-is-dead-in-the-water-888c10e8abb1 [1]
https://www.theverge.com/2019/7/12/20691957/mastodon-decentralized-soc… [2]
[1] See section on identity and moderation - you can't decouple them when you have a hybrid between a content platform and a social media application (Which is what any video hosting service that allows comments, or shows recommended videos, or cross-links to other distributed aggregators is.)
[2] Bad[3] people show up to the community, everyone loses their mind, hard-coded bans starts happening, because the community interfaces with things like app stores, and app stores have policies that don't care one whit about your federated free-as-in-speech ideals, not to mention that developers and moderators are human beings too, and maybe they personally can't stand allowing furries/commies/fascists/homosexuals/homophobes/Englishmen in their space.
[3] For whatever someone's definition of 'bad' is.
exikyut · 2019-12-19
The thing is, I can't/don't disagree with you, in terms of arguing for SQLite over alternatives. Hearing the practical specifics of your edge case is (depressingly) insightful.
I just realized the links I posted didn't include the article I had in mind when I went link-digging (and didn't properly check the results, woops). I found it: https://nolanlawson.com/2014/04/26/web-sql-database-in-memoriam/
Potentially interestingly, I re-found the link above via hn.algola.com, which also found me the comments (for the only time the above link was posted), at https://news.ycombinator.com/item?id=7661236. The top comment thread there points to https://github.com/kripken/sql.js, which was started pre-WebAssembly but now builds for WASM, and the network tab in devtools is telling me it's a 497KB download. It says it takes the position of providing a first-class JavaScript API instead of C bindings, and that you have to implement your own save/load<->import/export layer. You may have already discovered and discarded this possibility.
FWIW, if using SQLite does stick, I reckon that an article (even a small one) about the journey/decision process/implementation gotchas/etc - and particularly details about the use cases, and why SQLite shines for your scenario - would probably be received very positively.
Thanks for replying! (My fast response time was due to fun timing: I literally just opened my laptop this morning, checked HN, and saw your comment posted "0 minutes ago" :D)
jakub_g · 2017-07-12
Agree with the parent. Regarding yarn, it was created because npm started showing weaknesses in many things, with large and complex dependency trees: install was slow, sometimes unreliable and not cross-platform portable, and the codebase was difficult to refactor due to legacy code and backward compatibility, so it made more sense to create a new package manager without that burden and try to iteratively align with npm to become a drop-in replacement.
It's easy to fall into the fatigue due to new languages, tools etc. coming out each week but please think twice before posting dismissive comments like that.
I observe a lot of "I don't read HN anymore" sentiment lately among top tech Twitter users, partially due to that.
There's a lot of awesome stuff being given out for free and people are whining. (Yes, I'm a bit tired of constantly following and evaluating things, but I keep it for myself.)
The situation came to the point where some guys are thinking about not opensourcing their tools anymore due to constant criticism and maintenance fatigue. Read the two links below (accidentally, the first one is from yarn co-author!):
https://twitter.com/sebmck/status/879282797915119616
https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-so…
enoch_r · 2026-06-23
This piece changed how I work with LLMs and made me much more optimistic about how "fun" it can be to work with them: https://nolanlawson.com/2026/05/25/using-ai-to-write-better-code-more-…
Before I would just throw prompts at the LLM and it'd end up building a pile of crap (but semi-working crap, and 100x faster than I ever could) - it was pretty depressing. Using tools like `grill-me` (or `grill-with-docs`) I feel like I'm actually building my understanding of the system and helping shape it, and the results are much better.
acemarke · 2024-10-10
This seems to be a pretty low-effort post without any real substantive details.
I'd much rather see discussion of the "Parallel Evolution of React and Web Components" article that got posted earlier today. I don't agree with that author's strong stance against React, but it's at least a well-written post with substantial thought and significant technical detail:
- https://news.ycombinator.com/item?id=41790499
or these other relevant posts:
- https://nolanlawson.com/2024/09/28/web-components-are-okay/
- https://lea.verou.me/blog/2024/wcs-vs-frameworks/
- https://mastodon.social/@molily/113215236512572084
pradn · 2024-09-29
The use-case for having isolated objects with parameters, much like classes in Java, is to be able to a) share code, b) hide internal details, and c) have object behavior be governed solely by a constrained set of inputs.
So the point isn't to have your web component be different from the rest of the page. The point is that you can pass in parameters to make an off-the-shelf component look how you want. However, exactly how much freedom you want to give users is up to the component author. It is possible for there to be too little freedom, true.
See here [1] for a concrete example of someone writing a reusable web component, and figuring out how to let users customize the styling.
[1]: https://nolanlawson.com/2021/01/03/options-for-styling-web-components/
jauntywundrkind · 2024-07-17
Wow this is so embarrassing as hell. Apparently even using a WebWorker can still cause the UI to block when talking to indexeddb. https://nolanlawson.com/2015/09/29/indexeddb-websql-localstorage-what-… https://issues.chromium.org/issues/41204713#comment28
It's crazy how much effort goes into adding new things to the web but stuff like this is almost 10 years old.
benatkin · 2023-03-28
I think they're pretty neat, and that Svelte is one.
"I used this technique in my own emoji-picker-element. If you’re already using Svelte in your project, then you can import 'emoji-picker-element/svelte' and get a version that doesn’t bundle its own framework, ensuring de-duplication. This saves a paltry 1.4 kB out of 13.9 kB total (compressed), but hey, it’s there. (Potentially I could make this the default behavior, but I like the bundled version for the benefit of folks who use <script> tags instead of bundlers. Maybe something like Skypack could make this simpler in the future.)"
https://nolanlawson.com/2021/08/01/why-its-okay-for-web-components-to-…
Thing is I actually like coding in Vanilla JS, at least some of the time.
actionfromafar · 2023-01-12
https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-wri…
IndexedDB seems like a whole bag of gotchas. SQLite + simpler browser provided file backing seems interesting to me.
klooney · 2022-11-06
It is incredibly fast.
Also, it runs on very small devices: https://nolanlawson.com/2019/09/22/the-joy-and-challenge-of-developing…
fabrice_d · 2022-09-12
Servo produced a very fast CSS rules matching engine now used in Firefox (see https://nolanlawson.com/2022/06/22/style-scoping-versus-shadow-dom-whi… and WebRender which underpins Gecko's rendering. That's not nothing.
About embedding Servo, I have some experience around that (https://github.com/fabricedesre/servonk/) and it's been easy to embed: you just need to provide a GL surface and hook up your input events into their event loop. Clearly there were not zero integration points, and a some other examples exist (like https://github.com/paulrouget/servoshell).
clairity · 2022-08-05
the new-ish <dialog> tag with a <form method="dialog"><button>Close</button></form> inside, combined with styling the pseudo-element ::backdrop, comes very close to being javascript-less built-in solution for modals. you still need js to trigger opening the dialog though, but that can be as simple as document.querySelector('#dialog').showModal()
apparently <dialog>'s still needs some accessibility/interaction improvements to be a first-class solution, but it's getting there: https://nolanlawson.com/2022/06/14/dialogs-and-shadow-dom-can-we-make-…
petercooper · 2022-07-29
hitekker · 2021-08-12
I view the "standards" argument as a red herring for building a NoSQL db in the browser. Which, to this day, is slow, buggy and requires third party libraries to be usable [1]
For those who are able to stomach an uncomfortable political history instead of an easy, technical answer, you can take a look at [2]. It's interesting that 7 years later, many the folks who pushed hard to get rid of SQL in favor of NoSQL seem to no longer occupy positions of prominence in the industry.
[1] https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API#see_als…
[2] https://nolanlawson.com/2014/04/26/web-sql-database-in-memoriam/
TehShrike · 2021-08-12
I used it back in the day and was quite sad when it disappeared. Nolan Lawson does a good job telling the sordid tale at https://nolanlawson.com/2014/04/26/web-sql-database-in-memoriam/
wayneftw · 2021-04-15
For offline apps, WebSQL would have been awesome. Thanks to some ivory tower types at Mozilla we can't have it [1]. We got SQLite in a computer on Mars but apparently that's not enough to base a web standard around because some people think that It WoUlD Be BaD iF wE oNlY hAve oNe implEmentation! Oh noooo!
(This despite the fact that every Linux distro uses the same kernel and Linux hasn't suffered some sort of monoculture meltdown.)
[1] https://nolanlawson.com/2014/04/26/web-sql-database-in-memoriam/
cuu508 · 2020-07-08
If you're using Firefox on Linux, check out https://nolanlawson.com/2020/05/02/customizing-fonts-in-firefox-on-lin…
lacampbell · 2019-09-01
I realize Mozilla spearheaded an effort to remove webSQL from the standards. But chrome still uses it for fulltext search in gmail.
https://caniuse.com/#search=websql
https://nolanlawson.com/tag/websql/