Discord is ditching Electron and its new app uses less RAM (theverge.com)

154 points by archb 3 hours ago

Insanity 2 hours ago

Maybe the good thing to come out of the RAM crisis is that engineers will care about memory usage again lol.

the__alchemist an hour ago

I had trouble reading more than the opening volley of the article due to popups. Am a Discord user, and rust application programmer: What GUI framework are they using? EGUI? GPUI? Something custom?

GPUI from comments? I meant to try GPUI, but backed off after an announcement pending its maintenance would be in question (?) a few months ago, and Zed broadly ending up being a false messiah, for my uses. (Not on the tier of JetBrains IDEs, a bug with a long thread they closed which (still I believe?) causes it to open cached versions of files, then clobber edits made since the cache, e.g. by other programs. I.e. the sort of bug which renders software too dangerous to use. I will not switch to a GUI framework from a group that ignores bugs of that severity reported by many people)

kayson an hour ago

I'm very interested in (and a total novice in) cross platform GUI application development. Hadn't heard of GPUI, though I had heard of Tauri. I looked at the GPUI front page and saw this mess of almost-CSS method chaining... Surely there's a better way? This seems horrible to me.

> div() .flex() .flex_col() .gap_3() .bg(rgb(0x505050)) .size(px(500.0)) .justify_center() .items_center() .shadow_lg() .border_1() .border_color(rgb(0x0000ff)) .text_xl() .text_color(rgb(0xffffff)) .child(format!("Hello, {}!", &self.text)) .child( div() .flex() .gap_2() .child(div().size_8().bg(gpui::red())) .child(div().size_8().bg(gpui::green())) .child(div().size_8().bg(gpui::blue())) .child(div().size_8().bg(gpui::yellow())) .child(div().size_8().bg(gpui::black())) .child(div().size_8().bg(gpui::white())), )

Kuyawa 2 hours ago

The app size also went from 10 GB to 10 MB, start time went from 10 secs to 10 ms

Goodbye Electron, we barely knew you

mintflow 2 hours ago

I noticed this news and because one of my codex banked reset is expiring soon

I launch codex with astra+ultra on my tauri project because webview sometimes cause blank screen on user device to let it to rewrite the tauri projec to GPUI

It did those stuffs for me

- get rid of the CGO and MINGW toolchain for cross building windows on Linux

- wrote a compatbility layer to communicate the original app backend written using rust

- Achieve not ideal but acceptable UI/UX as the tauri project

- The new build using 24MB memory which is quite good and I do not even bother to check the tauri version

It amazing time to rewrite, though I still can't remember joy of old days that manual coding, but my lower back ask me to just embrace the Agentic coding...

Telaneo 2 hours ago

Holy Jesus of Nazareth. I love it.

I just pray that Vencord will continue to work in some form, if only so I can use whatever font I want. I'm not a fan of many other changes they've made and I've thus had to reverse, but I'm willing to trade away the flexibility of CSS for an app that uses 5 times less RAM. Even better if it doesn't go away at all, but we'll see.

PreciousH 2 hours ago

It's crazy how much RAM electron needs, at my old startup the main product was an electron app, i initially used to run into this issue where AI wouldn't clean up the dev builds it spunned up for e2e testing and each could be over 500MB, it just get's to a point that the cross platform advantage is no longer worth it, i think it was one of the main reasons cursor had to move off electron to rust based builds.

Swiffy0 2 hours ago

Not sure what to think of this.

Sure, a Rust implementation will perform better and use less RAM, but it's quite obvious that the transition to Rust will be done almost entirely by AI.

Don't get me wrong, the AI coded Rust version of Discord will most likely work just fine. The thing I'm wondering about is if it's a good idea to rewrite your whole codebase (which I assume is handwritten since Discord predates AI coding) with AI because now there is nobody that knows how it really works - I'm wondering what's the value of having a human-written codebase + the people who wrote it. Just feels like one shouldn't throw that into the trash like it's nothing?

AlbinoDrought 12 minutes ago

With the browser sandbox gone, it will be a good test of faith. Here's to an RCE-free port

throwaway2046 2 hours ago

Daedren 2 hours ago

I've never used GPUI. Does GPUI provide the same assurances of accessibility? Of proper CJK rendering?

Activities will apparently still use Tauri. Is that going to be a compatibility nightmare due to WebKit? (At least until CEF comes out)

Venn1 2 hours ago

The Linux desktop client was using a bit more memory than I expected. 1326 MB from a cold start, and I'm only in 11 servers.

krystalgamer an hour ago

If I understand correctly, they're ditching Electron but still using React but with their custom renderer.

smolder 2 hours ago

There was already an electron-free native client for discord some years back, but they interfered with it. At this point, there's nothing at all impressive about this. It's not hard to ask AI to "RIIR" as has been shown many times. However, I am glad that building stuff on electron might finally be seen as lazy and wasteful.

Jonovono an hour ago

GPUI is pretty great. I whipped this up the other week and now I no longer need to open VSCode: https://diffy.run

asow92 an hour ago

Asking in good faith: In the agentic age why use abstractions like Electron at all? Shouldn't we write apps in lower-level system languages like Rust like Discord has done?

lookeey 2 hours ago

wpm 34 minutes ago

Someone should do this for Slack

greatquux an hour ago

DO TEAMS NEXT

nonethewiser 2 hours ago

It doesn't say but it's likely a direct product of AI.

resters an hour ago

discord's electron app was a study in bloatware, quite unlike nearly all other electron apps I've used.

hobo_mark 37 minutes ago

RIP ripcord.

musha68k an hour ago

Potentially even more lightweight: ditch Discord altogether.

Maybe we should collectively use more of our personal tokens to re/write, extend and mix up the common(s) stacks at this point?

dist-epoch an hour ago

As the motto says, "you can just do things"

Such a rewrite would have been unthinkable 2 years ago, but now it's table stakes.

pipe01 2 hours ago

RIP mods

xmichael909 an hour ago

more for sam altman!

paxy an hour ago

We are at a point where the "port this to rust, make no mistakes" meme is basically a reality.

jmyeet an hour ago

We've barely begun seeing the impact of AI on software (IMHO). Things like vibecoding the Adobe suite are going to destroy Adobe. That's going to happen to other companies too. It'll take awhile but it will happen.

I've always disliked Electron apps in principle. The idea was you could write once, run anywhere, which is something we've heard before so many times but it never really works out that way. Back in the early days of Java we heard this mantra with applets and Java desktop apps and the reality was "write once, test everywhere".

The cost is simply too high. Nobody wants an entire browser engine packaged to run a desktop app. Security-wise, this is a nightmare. It's such a huge attack surface (eg [1]). And resource-wise it's also a nightmare. Honestly, Electron apps can't die fast enough for my liking.

What I think we'll see is a return to desktop apps because the cost of porting them to new platforms is dropping like a rock.

There are modding issues with Discord's migration but I believe modding itself is going to be an issue in a world where it's going to be increasingly easy to find and use exploits.

I also wonder if Discord is the best we can do here. I've always hated Discord from a UI/UX perspective. Nothing about it is intuitive (IMHO). There are like 3 different settings buttons. You join a Discord and you get yet another custom flow of having to go to this channel and select roles and do something before you can do something else blah blah blah. Everything feels shoe horned. And Discord channels are a worse repository for information than the old forums were.

[1]: https://www.sentinelone.com/vulnerability-database/cve-2026-...

Kuyawa 2 hours ago

"To continue reading *blah blah* *barfs* Verge subscription" WTF???

15 years reading the verge without subscription. What happened?

eastbound 2 hours ago

That's a direct benefit from AI.

If all products ditch Electron, it satisfies the NSA requirements of having AI-generated backdoors on your computer, while allowing you to reduce your RAM consumption and letting this precious silicon for Sam Altman (He's quoted saying RAM is better spent in data centers than in personal computers - and in an era where everything is Cloud, one might wonder why the base Macbook Pro has 32GB).

elevaet an hour ago

Hopefully we will get an Electron-free VSCode too at some point.

edit: there is one https://github.com/Sidenai/sidex haven't tried it yet

hendrikmans an hour ago

Electron being bad is a bit of a junior- to mid-level engineer tell in my eyes, the sort of thing you'd say if you've just learned that some apps use more RAM than others, maybe built a small Rust TUI and are now wondering why not everything is using Rust. Something you'd believe just before you learn what engineering trade-offs are.

So, yeah, enjoy rebuilding complete browsers, I guess? I'm sure they'll run more efficiently than the rendering engines that have been refined and tweaked over the course of now multiple decades.

Well, unless you leave out the annoying stuff, like a11y, IME, RTL, but who needs those things anyway, am I right.

Then you find out that iterating on a fully Rust-based app is sloooow, so you add a scripting layer, maybe integrate a little Lua VM or something that lets you execute JavaScript?

Congratulations. You've built a browser, just with fewer features, more bugs, and probably higher RAM usage. Good job.