Hacker News new | ask | show | jobs
by lenerdenator 32 days ago
Electron's more-or-less just Chrome without... erm... chrome, so it makes sense that it's bloated and uses too much RAM. Even well-constructed and efficient JavaScript executed through it will do so on top of a bunch of stuff your application might not even need.

One thing that I really hope we see out of the LLM revolution: a return to native applications. You could argue that Electron cross-platform apps made sense when you had to pay a team to maintain two or three (at least) native clients; you can't make that argument anymore when the marginal cost of a line of code is $0.00.

2 comments

Chrome is pretty efficient, as far as per page costs go! If your architecture isn't trash!

The sin is this ridiculous era of every program shipping its own runtime. I'm headed for real down votes, but this is the same lazy culture that's taken over everywhere: go and rust both ship these huge statically compiled binaries.

When you are a company, you're only running a handful of different workloads/apps on any given box, so the statically compiled price doesn't bite you. But as users, going back to dynamically linking and making the incremental cost of loading an app not also have to carry the entire world with it is such an obvious return, and one that alas seems to not be in progress at all.

The agentic age is, I hope, going to question a lot of old assumptions & needs about what we want to run. Having lots of small resident little user agencies, compiled small scripts that are attributed to a user, is something I believe will happen, but I'm less convinced we'll recognize the face of it as it happens, that the tales will be told.

Tools like agent-substrate, ax, scion, are this interesting mix between agents, serverless, and kubernetes. I find it fascinating. (For hire on this.) https://github.com/agent-substrate/substrate

> Chrome is pretty efficient, as far as per page costs go! If your architecture isn't trash!

> The sin is this ridiculous era of every program shipping its own runtime. I'm headed for real down votes, but this is the same lazy culture that's taken over everywhere: go and rust both ship these huge statically compiled binaries.

Go and Rust are pretty efficient too, if your architecture isn't trash. If it is, they still probably are more efficient than Electron

If we want a system like, say, sdf, it would be so much worse to make each program have to host its own world, its own runtime.

Rust and go are somewhere on the continuum, between dynlibs and chrome, for how much private world they build for themselves. It's vastly less than chrome. But it's a lot. A lot more than what Linux distributions did for years and years and years.

Especially if you think if multiuser systems with multiple people using programs, then you have some scaling factor. Then it matters a lot a lot more than each lib has to be loaded distinctly for each process.

It's not good. It's not good for Electron, there are vastly better ways to run many apps taking a more dynlib path, and it's not good for rust or go. As nice as it is to dev like that.

Of course it's another huge problem that dependency trees are rarely shared. Go look at Class Data Sharing in Java: building the libs you standardize on (your orgs stdlibs) and there's this beautiful idea here that you should just already have some common things expected to be there. That's harder to imagine since so many programs have such different dep stacks. But imagine having a Tokio or tokio+++ that everyone can use, good foundational tools (Grand Central dispatch and the never arrived NextBSD) Some common substrate, with just like async as one example. And the size of that shared good useful library/platform can grow, hopefully revive an interest in reuse vs bringing your own every time. https://docs.oracle.com/en/java/javase/17/vm/class-data-shar...

I'm not sure at all what you're talking about at this point. The most relevant thing I can find with the abbreviation "sdf" is https://sdf.org/, but I don't understand what hypothetical version of that you're talking about where would be entirely contained within a Chrome instance.
sdf.org is the one. it’s a shared computing environment with thousands of users, mostly volunteer and donation based.

GP is stating that on such a system, static executables are expensive (and chrome is completely out of scope)

Sure but they can do that because they own most of the system. It's the same with e.g. Debian - all the binaries you get from the repo work with all the libraries you get from the repo because they're built as part of one big project. When a separate party wants to ship something that works on most Linux systems they have to minimize dependencies as much as possible. They don't get the luxury of being the same person who controls most of the rest of the system.

A Go binary can be scp'd as a single file to any server with the same processor architecture and just run. I've never encountered that in any other framework.

> The agentic age is, I hope, going to question a lot of old assumptions & needs about what we want to run.

There's no reason to think that "the agentic age" will bring about any runtime efficiency. It may, perhaps, reduce development time but it doesn't introduce any new incentive to make software more efficient. It may happen, in a very roundabout way, by making consumer RAM massively more expensive which might induce customers to choose more efficient software, but it's too early to tell if this effect if happening.

There's no reason to think anything might change, that process execution and what we run is going to stay the same on and on and on. Got it. Stasis forever. Let's not consider anything else!
That's a rather stupid reply. The economics of the production have changed, but not the incentives.
Well its mirroring a stupid idea back so yeah I agree it is stupid. Really stupid.

It seems ridiculous, beyond imagining to me to imagine software runtimes won't change one iota as the world starts copariticpating a bit more in computing, as we have all these agentic systems spawning. You'd have to be mad to bet on stasis. I don't know why anyone would cling to such an assumption that it's just going to tick on same as ever. That's the goofiest shit.

Software has changed and evolved and shifted forms so many times already. This seems like a very big possible impact. Maybe most people don't see and remain in their disbelief for 6 months. For a year. For two years. For five years. But I think on retrospect it's going to be quite clear that software runs very differently and that we generally did change workload running, execution, runtimes massively, in direct support of the LLM age. There's some question of how long it's apparent. But on a long enough timeline all stasis leads for rebirth. And this is a pretty high dynamic energy age now. This idea that stasis is going to win. And keep winning..on and on: I am a skeptic. I already too too much contrary evidence.

Blah blah blah.
What I don’t understand is, why not just use a platform native webview? Mac has it at least, I think Windows does as well. You'd think it would be the same amount of work (roughly) but use a lot less memory.

I guess developers really prioritize velocity or ease over everything. Or maybe it's business pressure or directives?

There's a comment somewhere on HN from a Slack dev who was the one responsible for moving away from platform-specific webviews to Electron. The core reason is that Electron is the same on all platforms it ships on, generally speaking.

Platform-specific views simply aren't. For simple applications they might make sense, but at a certain point devs just want the shit to work. Electron solved that.

I do agree that LLMs & co should contribute to reversing this trend, though. I don't really see why you couldn't try to ship (true) native now.

The slack example is particularly funny, I've used slack at work since early 2015 and I can't recall ever installing an app. I just pin a browser tab. What would be the point? The website does it just fine.

Even this is annoying compared to how it used to work, before they killed the IRC gateway you didn't even need a browser tab because it worked just fine in a terminal tab.

In the evergreen (and generally broadly much better) browser age this is an assumption / concern that I think could really use some reconsideration, lol.

Maybe once we didn't dare surmount the challenge, but today, the landscape is a lot better (and a lot less chaotic) and while yeah it sort of sucks in some annoying ongoing ways I can't imagine every org is going to find this some insurmountable difficult strenuous activity. Like, get good.

The anti-will against doing this drives people away from the web as platform.

Tauri is still pretty problematic, mainly because of WebKit vs Blink, nothing has changed to improve that.

They do have an ongoing effort to replace all of this with CEF, but it's still not done.

There's Tauri, but (at least when I tried it last) it had bugs that made building functioning RPM packages extremely difficult. Bug(s) had been there for over a year at least with no momentum, so if you need to support rpm-based distros you're in for a rough time.
Business pressure. Always business pressure. Sales sold a bill of goods and now you need to deliver ASAP. Hardware was cheaper than dev time. Was.

Yes, they're getting their bonus. No, we can't hire and onboard more people to deal with the insane demands being made as a result. Why do you ask?

1. Cross platform.

2. While browsers are pretty compatible nowadays, not having to deal with WebKit/Safari quirks is a plus.

3. The platform webview isn’t necessarily that much more efficient.

I mean if you look at all the frameworks that are trying to push towards native support across platorms, the ones that are took a pit stop at platform-native webviews, before going full native all have negative opinions of platform-native webviews. Besides all the tons of effort and buggy sharp corners there are across platforms, a lot of them just make really crappy UIs.

Most of the projects that I have seen are trying to push past that and get towards actual native-native (non-webview) rendering because despite being an even bigger pain and more work, they come out a lot better than the webviews.