I can't say it enough: "vdom" is not fast. It is slow.
The only *defensible* claim is that it isn't as slow as one might think given how much overhead it adds...but that doesn't make it competitive or good.
Computing diffs through something like React's reconciliation algorithm is a clever way to avoid needing to have knowledge of the potential changes that can occur on either the JS or DOM side.
But it's correspondingly very expensive.
Reactive systems that constrain *either* how you update DOM (e.g. Lit's template system) *or* cabin the effects of JS side-effects (Svelte's "reactive declarations", FAST's Observables) deliver superior performance because they don't need to model + compare the whole world
Now, React and other vdom systems have ways of saying "don't diff me bro!", but they don't reduce the memory and GC overhead of diff management, and they're error prone.
But most importantly, they aren't the default. Which means the default is *SLOW*.
There are other ways that the toolchains that tend to come with React (hilariously, justified by performance concerns) tank startup and destroy the first best chance to make a good impression with users...but just know that the core is *also* slow.
By design.
Someone will inevitably slide into my DMs with DBMon whataboutism. *Sigh*.
Every framework can tune for hot paths (usually by getting back to NOT diffing). But the question is average costs across components built the usual way.
The problem of hot repaint loops is exotic and unusual.
Yes, it happens. Yes, perf matters there. But it's so rare as to be a special case.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Having looked pretty deeply at various blockchain tech stacks over the years, this thread seems dead on.
People are holding on to *the dream*, and the fact that the tech will impoverish millions, help destroy the one world we share, and fail to avoid aggregation is immaterial.
I can't stress enough just how transparently wrong the "decentralised" claims are should you care to look.
Not the dream of decentralisation (whatever that is), but the lived reality of all these systems. Bitcoin? Mostly traded through exchanges now. And they will be regulated.
"web3"? Well, you can't find anything...so you get alt-stack, slower, less capable versions of systems we already have:
Browser teams (the folks who work on UI) don't think of content as "their problem". For historical reasons, they care about TLS and that has helped them make common cause with security interests.
But no such enlightenment has occurred around performance...and in particular, perf so bad that it endangers accessibility.
Platform teams, meanwhile, focus on making the runtime faster, rather than building common cause between users on high-end and low-end devices.
Stop trying to sculpt David with a JS chainsaw and get yourself an HTML/CSS chisel.
Like, it *could* be an SPA, in the same sense that one *could* use a solid rocket booster to power one's car.
How do I know it's ridiculous to apply this much JS to the problem?
Because I helped build e-commerce sites with similar features (filtering, carts, etc.) that had to work on 4.0 browsers over 33.6 modems to WebTV boxes in 1999.