News for hackers. Stuff that matters.
Re:X is justifiably slow by freeone3000 on Saturday June 01, 2024 @04:21PM (#40548781)
The performance hole is the javascript. Drop back to rendered HTML and some simple CSS rules for display, avoiding redraws and never having a single reflow, use system fonts, and host resources on the same domain as your HTML. You will be amazed at the speed!
Re:X is justifiably slow by EasyMark on Saturday June 01, 2024 @07:38PM (#40550072)
I’ve only done htmx and html + jQuery (&JS) interfaces for web but both were very reactive and hard to tell from native. What gets you is data fetches over networks. Can seem native when local and glacial over a slow network connection. I don’t think it’s necessarily the react/htmx/ etc frameworks, it’s the architecture usually. Javascript + DOM can be really fast, at least on modern hardware.
Re:X is justifiably slow by whstl on Saturday June 01, 2024 @04:41PM (#40548917)
But pure Javascript in itself is rarely the problem, there’s plenty of CPU-demanding websites that are responsive and performant.

IMO the problem is what JS enables: making lots of very slow Ajax calls for every small interaction. Which works great in development machines but sucks when a real network is involved.

But your point stands, dropping to server-rendered HTML makes it fast again.

Re:X is justifiably slow by oDot on Saturday June 01, 2024 @06:01PM (#40549429)
It's not only the language itself, but also the way it lends itself to the developer.

I've been using Gleam in Vue[0] for my task app Netful[1] and it surprisingly reduced a lot of the jank, because... it's sync.

Awaits are used very often for things that shouldn't be used for and have compounding overhead.

[0] https://github.com/vleam/vleam

[1] https://nestful.app/

Re:X is justifiably slow by kaba0 on Sunday June 02, 2024 @04:53AM (#40552572)
Pure react will be plenty fast. Really, try it. It’s when websites add 6 tracking libs, use some less than adequate developer that writes questionable code, and loads 3 ads per user interaction when it slows down, the same way whatever immediate UI would, were it written in hand-optimized assembly even.