Discord's Ground-Up Rebuild Aims To Slash RAM From Gigabytes To Megabytes

hero Official Discord code graphic.optimize
Official Discord code graphic. Image: Discord
Discord is at the cutting-edge of social media and instant messaging platforms in terms of features and customization, but its weak optimization is finally getting addressed with a full Rust programming language rewrite. Currently, Discord is built on Electron, which is essentially a stripped-down Chromium-based web browser that runs the Discord web client as a web page.

As we've seen on the Windows side of things, there are major detriments to memory and CPU usage by using this approach instead of writing a fully native application. In fact, most of the performance gains we've been seeing in recent Windows updates can be attested to more parts of Windows switching from the also-web-based React over to the native WinUI framework, for example.


Per this Tweet from Discord CTO and co-founder Stanislav Vishnevskiy, Discord is due for a full Rust rewrite in the near future. Right now, the application is being internally tested as "Discord Phoenix," and the post shows a screenshot of Discord only using .1% CPU resources and a measly 290 MB of RAM. At idle on my PC with a large server list & numerous friends, Discord typically hovers around 800-900 MB of RAM consumption, with similarly low CPU usage.

For those not already familiar with Rust, it's a security-first programming language that sacrifices some performance compared to classic C/C++ in favor of a structural immunity to certain types of security exploits; particularly, most memory-based exploits. Rust has exploded in popularity in recent years due to striking a favorable balance of performance and reliability, and it is a favorite of developers who are embracing the recent shift back toward native execution versus portable web apps. AI-coded Microsoft Office and Adobe Creative competitor ArtCraft, for example, uses applications built entirely on Rust.

Another key benefit of the Discord Phoenix rewrite is that it is making use of the GPUI native user interface framework, which is designed to maximize speed and reduce memory overhead. It allows for direct GPU rendering, high-refresh rate responsiveness, and best of all, full code sharing across devices, as it's a fully cross-platform library, meaning that the move to native Rust doesn't leave desktop or mobile behind.

The Discord Phoenix Rust rewrite certainly looks promising; the huge cut to memory usage will be huge for low-end and mid-range PC gamers who need Discord for their team or party chat. Unfortunately, Discord hasn't revealed when this wondrous revamp of the ubiquitous chat app will make its way to gamers. Hopefully the answer is sooner than later.
Chris Harper

Chris Harper

Christopher Harper is a tech writer with over a decade of experience writing how-tos and news. Off work, he stays sharp with gym time & stylish action games.