Live data from Hacker News

Svelte’s characteristics that likely contribute most to improved performance

chuniversiteit.nl

201–205 of 205 posts

Re: Svelte’s characteristics that likely contribute most to improved performance

#201
post #184

Earlier quoted context omitted.

Except RSC doesn't solve for apps, it solves for websites, which means its server-first model leads you to slow feeling websites, or lots of glue code to compensate. That alongside the immensely complex restrictions leaves me wondering why it exists or has any traction, other than a sort of technical exercise and new thing for people to play with. Meanwhile, sync engines seem to actually solve these problems - the di…

> Except RSC doesn't solve for apps, it solves for websites This isn't true, because RSCs let you slide back into classic react with a simple 'use client' (or lazy for pure client). So anywhere in the tree, you have that choice . If you want to do so at the root of a page (or component) you can, without necessarily forcing all pages to do so. > which means its server-first model leads you to slow feeling websites, or…

Definitely disagree on most of your points here, I think you don’t touch at all on optimistic mutations, don’t put enough weight on the extreme downsides it enforces on your code organization, the limits and downsides of forcing server trips, the huge downsides of opting out (yes you can, but now you have two ways of writing everything and two ways of dealing with data, or you can’t share data/code at all), it is in effect all or nothing else you really are duplicating a ton and then even worse DX.

Many of the features like transitions and all the new concepts are workaround you just don’t really need when your data is mostly local and optimistically mutated, and the ztunes app is a tiny demo but ofc you could easily server render it and split transitions and all sorts of things to make it more of a comparable demo to what I assume you think are downsides vs RSC.

I think time will show that RSC was a bad idea, like Redux which I also predicted would not last the time of time, it’s interesting in theory but too verbose and cumbersome in practice, and other ways of doing things have too many advantages.

The problems they solve overlap more than enough, and once you have a sync engine giving you optimistic mutations free, free local caching, and free realtime sync, you look at what RSC gives you above SSR and there’s really no way to justify the immense conceptual burden and actual concrete downsides (like now having two worlds / essentially function coloring, forces server trips / lack of routing control) I just bet it won’t win. Though given the immense investment by two huge companies it may take a while for that to become clear.

Re: Svelte’s characteristics that likely contribute most to improved performance

#202

The fact this is already outdated by more recent Svelte releases which changed things drastically is exactly my problem with the modern JS space. So fast moving and most of it is still doing JQuery like reactivity. I am probably just not smart enough to get it, but it reminds me of the constant seemingly pointless rewrites I see in companies. Figure out what works and keep it, is that so hard? Why can other languages…

The reason the web changes so fast, and there are so many rewrites, is the same reason a puzzle whose pieces don't fit together keeps getting shifted around and restarted. People are looking for a satisfying non-leaky abstraction to build upon and they don't find it with web technologies. They get close, but those last few pieces never quite fit, and we lack the power to reshape the pieces, so we tear out all the pie…

You seem to be conflating javascript with web technologies. So many other web tech doesn't shift nearly as much as the javascript space does.

Re: Svelte’s characteristics that likely contribute most to improved performance

#203

It's that fast because it uses a declarative model and this ends up being very efficient for a variety of use-cases (I say this speaking from a NixOS laptop; Nix operations are invariably much faster than alternatives, like Docker, assuming you have the technical chops to get them to work)

React also uses a declarative model, in fact React might be more declarative because it's still declarative at runtime, whereas Svelte et al. do a lot of static analysis to turn declarative UI into imperative targeted dom updates.

Good point. I guess Svelte then takes advantage of both models; a declarative content change might by default result in a large update but the diff is ultimately the only thing that gets applied imperatively; I'm not sure how else React would do it though since the only natively-declarative browser technology is HTML and CSS; as soon as you touch JS, things start being imperative

Re: Svelte’s characteristics that likely contribute most to improved performance

#204

Earlier quoted context omitted.

But how many use _just_ React now? There is a whole stack that 90% of YC companies use: Node, pnpm, Next, React, doing SSR by default. Idk about it all. Most of the time when I ask why they do SSR they can't tell me a valid reason. Their bundle sizes are so big for what the apps do.

I've used plain react for a few things in the past few years. I strongly prefer it to next/nuxt/all this other stuff. Preact and an understanding of best practices can make it fairly performant with a more or less drop-in replacement if you're willing to sacrifice compatibility with absolutely all the ecosystem. I still prefer svelte but it's less mature and universally-known. React is still a pretty good choice if y…

Anyone can write svelte. Or solid. Or Angular.

I don’t even want to talk to somebody that defines themselves as a “React” developer. Let alone work with them.

If you know any of these frameworks, and the basics of web development you can work in any of them.

So the hiring part is not an excuse for this.

Re: Svelte’s characteristics that likely contribute most to improved performance

#205

Earlier quoted context omitted.

It's just a new way of using reactive vars, which you have to get used to a bit, and which people that don't like change are annoyed about. But it's ultimately a more consistent and flexible way which actually makes a lot of sense once you're used to it.

Thanks for the reply! I’m kind of curious to try out svelte, and that is helpful info

I would say go for it. Svelte is very nice compared to React or anything else if you ask me.
Post reply on HN