Back to all posts

Why We Chose C++ Over Electron

When we started building NativeOffice, the first and most consequential decision we made was the choice of language. Most modern office software and productivity tools are built on Electron, a framework that bundles an entire Chromium browser instance inside every application. This approach trades performance and resource efficiency for development speed. We made the opposite trade.

NativeOffice is built entirely in C++ with Qt6. Here is why that decision matters, both technically and for the end user experience.

Memory footprint is not an afterthought

An Electron application ships with a full browser runtime. Even a simple document editor built on Electron can consume several hundred megabytes of RAM at idle, before a single document is even opened. This is because the application is, structurally, a web page running inside a browser, and browsers are heavy by design since they need to support the entire modern web platform.

C++ gives us direct control over memory allocation. There is no browser engine sitting between our code and the operating system. When NativeOffice is idle, it stays idle. When you open a large spreadsheet, memory usage scales with the actual data you are working with, not with the overhead of an embedded browser.

Startup time is a compounding cost

Every time a user opens an Electron-based application, they are effectively launching a browser and waiting for it to initialize before their actual work can begin. This cost is paid every single time, and it compounds across a workday where an application might be opened and closed multiple times.

A natively compiled C++ application has none of this overhead. There is no runtime to bootstrap, no JavaScript engine to warm up, and no rendering pipeline built for arbitrary web content. NativeOffice opens in the time it takes the operating system to load a standard executable, because that is exactly what it is.

Predictable performance under load

Document editing, spreadsheet calculation, and PDF processing are all workloads that benefit from tight control over CPU and memory usage. In an interpreted or JIT-compiled environment, performance can vary based on garbage collection cycles, JavaScript engine optimizations kicking in or falling out of scope, and the general unpredictability of a managed runtime.

C++ compiles directly to native machine code. There is no garbage collector pausing execution at unpredictable moments. There is no JIT warmup period where early operations run slower than later ones. Performance is consistent from the first keystroke to the thousandth.

Disk footprint reflects architectural honesty

NativeOffice installs at a fraction of the size of comparable office suites built on Electron or similar frameworks. This is not a minor implementation detail. It is a direct consequence of not bundling a browser runtime, a JavaScript engine, and the associated dependency tree that comes with it. What you install is the application itself, not the application plus an entire secondary platform required to run it.

The tradeoff we accepted

None of this comes for free. C++ has a steeper development curve than JavaScript or TypeScript. Memory management, while giving us control, also requires discipline that garbage collected languages do not demand. Development velocity on certain features is genuinely slower than it would be in a web based stack.

We made this tradeoff deliberately. NativeOffice is built for people who care about how their software behaves on their machine, not just what it looks like on a marketing page. A tool that opens instantly, uses memory proportional to the work it is actually doing, and does not idle at hundreds of megabytes of RAM is a meaningfully different product than one that does.

What this means going forward

As we continue building out NativeOffice, this same principle will guide every architectural decision. Features will be added when they can be implemented without compromising the performance characteristics that define the product. We are not interested in matching feature checklists at the cost of the experience that makes NativeOffice worth using in the first place.

If you have questions about the technical architecture of NativeOffice, or requests for topics you would like to see covered in future posts, the Q&A section on this site is open to everyone.

Shivank Prabhudessai Founder & CEO, NativeOffice