Live data from Hacker News

There's no reason for software to be slow anymore

danluu.com

381–390 of 530 posts

Re: There's no reason for software to be slow anymore

#381
post #359

Yeah.... maybe . I think AI is still too prone to go down rabbit holes and not understand the whole picture well enough to come up with good optimisations. It's probably good at micro-optimisation, e.g. pre-allocating arrays. But is it going to realise that you don't need that array in the first place? I dunno. On the other hand it does mean there's no excuse for writing your program using Python or Electron or whate…

Are you suggesting Electron is slow? What evidence do you have? There may be a +200ms start up time compared to a native application; is that so bad? Besides a bootup that is no longer than your browser's, everything else inside an Electron app can be identically fast to a native application. Please be a better filter - do not spread bad memes.

> everything else inside an Electron app can be identically fast to a native application.

HTML layout and rendering is almost never as fast as GUIs like Qt. Also Electron apps usually use JavaScript which is slower than "fast" languages like C++/Rust/Kotlin/etc.

The reason people use Electron is because it's easy, especially if you have to have a website anyway. Slack is a great example of this. They already have a full website so it's kind of silly to redo the whole thing...

Unless AI makes it easy. We'll see I guess.

Re: There's no reason for software to be slow anymore

#382

Yeah.... maybe . I think AI is still too prone to go down rabbit holes and not understand the whole picture well enough to come up with good optimisations. It's probably good at micro-optimisation, e.g. pre-allocating arrays. But is it going to realise that you don't need that array in the first place? I dunno. On the other hand it does mean there's no excuse for writing your program using Python or Electron or whate…

The reason for using Electron is to write once and run everywhere right? I get that LLMs would make it faster to write distinct copies for different operating systems and maintain them both but thats still more costly than a single system. Sorry if I’m misunderstanding the goal of Electron but it still seems cheaper and easier (although admittedly worse than multiple native apps)

Yeah that's my point. Maybe AI will lower that cost to the point where it makes sense to write e.g. a native Slack app. I dunno, we'll see.

Re: There's no reason for software to be slow anymore

#383
post #371

Earlier quoted context omitted.

>SSR but in the browser We've come full circle.

I think this is our third lap.

Are you counting mainframes with dumb terminals then smart terminals then PCs, early SSR websites then web 2.0, the multiseat/thinclient craze of the 2000s then computers becoming cheap enough to stick them to the back of monitors?

Re: There's no reason for software to be slow anymore

#384

Earlier quoted context omitted.

Can't they use ML to predict where I'm going to click, and pre-cache the predicted page whenever the predicted button doesn't mutate important state? Or skip the difficult ML and have some basic rule of thumb that pre-caches frequent button clicks, using a markov chain, and conditioned on those pages being low bandwidth to pre-load.

McMaster Carr website prefetches _all_ links upon hover. Saves you like half a second in many cases.

segor.de goes one better and just downloads the entire catalogue when you first open it. About 2MB decompressed. Clicking and even searching is instant because it's all fully client side until you place an order.

Funny thing is it apparently predates JSON. It's a bunch of data[foo][bar] = baz; - go look.

(Website's in German obviously, and a surprising number of German electronic terms are very different from English. They use two different words for stranded and non-stranded wire.)

Re: There's no reason for software to be slow anymore

#385
post #44

One of the biggest causes of slowness is just waiting for web requests. The fact that so much software is either online or built using the same stack even if it isn't, puts all that software in this blocked/waiting state constantly while using it. Anyone not in the US feels this even more since so much online is US hosted, 300ms for every little interaction adds up quick. If your software has the affordance of a wait…

To dogfood this, rent a VPS in Australia and put a test environment there. Should be about 200ms ping or a bit higher. How it runs for you is how Australian users are seeing your site, even if their last mile connection is fiber.

[deleted]

Re: There's no reason for software to be slow anymore

#386

Earlier quoted context omitted.

Can't they use ML to predict where I'm going to click, and pre-cache the predicted page whenever the predicted button doesn't mutate important state? Or skip the difficult ML and have some basic rule of thumb that pre-caches frequent button clicks, using a markov chain, and conditioned on those pages being low bandwidth to pre-load.

If we stored the edges (links) and nodes (pages) separately, rather than requiring you to blindly run a node's code just to discover what its edges might be, then you could skip the prediction and instead pre-cache the next hop for all edges just in case you follow one. You could even do this to two or three hops. This might seem wasteful, but if the web were content addressed instead of server addressed you could th…

We have that, it's called an tag.

Re: There's no reason for software to be slow anymore

#387
post #44

One of the biggest causes of slowness is just waiting for web requests. The fact that so much software is either online or built using the same stack even if it isn't, puts all that software in this blocked/waiting state constantly while using it. Anyone not in the US feels this even more since so much online is US hosted, 300ms for every little interaction adds up quick. If your software has the affordance of a wait…

One of my all-time favorite software quotes is, "The fastest request is no request at all."

After traveling around in places with very poor wifi/phone data speeds. I couldn't agree more with you.

Re: There's no reason for software to be slow anymore

#388
post #44

One of the biggest causes of slowness is just waiting for web requests. The fact that so much software is either online or built using the same stack even if it isn't, puts all that software in this blocked/waiting state constantly while using it. Anyone not in the US feels this even more since so much online is US hosted, 300ms for every little interaction adds up quick. If your software has the affordance of a wait…

Shotout to PowerSync for enabling companies to go in the opposite direction and build offline-first apps. My company is a (production) customer, and we recommend it.

Yup, this is the solution for a huge class of "slow" apps. More alternatives like PowerSync here: https://zero.rocicorp.dev/docs/when-to-use#alternatives

Re: There's no reason for software to be slow anymore

#389
post #44

One of the biggest causes of slowness is just waiting for web requests. The fact that so much software is either online or built using the same stack even if it isn't, puts all that software in this blocked/waiting state constantly while using it. Anyone not in the US feels this even more since so much online is US hosted, 300ms for every little interaction adds up quick. If your software has the affordance of a wait…

Surely the biggest cause of slowness is doing more stuff. We don't turn faster hardware into faster programs, we turn it into more program. AI isn't going to change that. We'll just get even more program because the optimisation has freed up space for that. Unfortunately most of the time, the more program isn't for our benefit. I note that by far the heaviest program I use is my web browser. The one thing I don't get…

A browser isn't really a program any more but a platform for running other programs. Like how javaw.exe is really Minecraft, firefox.exe is really YouTube. Go to about:processes to find more detail.

Re: There's no reason for software to be slow anymore

#390

"LLMs are causing slow, bloated, code are going to eat crow once they re-write everything in super-optimized assembly." This person doesn't understand how to make efficient code. I can write code in almost any language (with a couple of exceptions) that outperforms "super-optimized assembly". Writing efficient code isn't about the language, and often isn't about the best algorithms either (but sometimes it is). Its a…

I think it's more about not doing unnecessary things. Like a like a saying I heard somewhere "a clever person solves a problem, a wise person avoids it". Not every good idea _needs_ to become a feature. And if you think it's that good, give users the option to turn it on/off and track that as a metric.
Post reply on HN