ProtonMail / inbox-desktop

Desktop application for Mail and Calendar, made with Electron
GNU General Public License v3.0
63 stars 3 forks source link

Why Electron? #2

Closed Yovach closed 10 months ago

Yovach commented 11 months ago

Hi, I'm curious as to why the app is written with Electron and not with Tauri as it seems to be a website wrapper.

The Electron app requires a large file (a yet another chromium browser like VSCode and Discord) to be download whereas Tauri can be small

flavienbonvin commented 10 months ago

Hello, thanks for the feedback and the patience.

I can share some insights regarding why we went for Electron instead of Tauri. We started the project with a market overview of what our competitors and other companies were using, and the overwhelming majority is using either Electron or CEF. Here are a few reasons why we decided to go for Electron:

Those are the main reasons we decided to go for Electron instead of alternatives such as Tauri. Tauri looks promising, but the lack of usage by big companies and the use of the OS web view (which could introduce unexpected bugs) was what made us go for Electron instead.

Yovach commented 10 months ago

Hi Flavien, Thank you for your reply and for the details which make the choice much easier to understand.

The fear I had was particularly related to memory usage for Proton desktop applications (Proton Pass, Proton Pass and Proton Drive) which can be expensive on a relatively old PC.

flavienbonvin commented 10 months ago

I did some testing when selecting the technology for the desktop application. I reviewed some of our competitors and other well-known Electron applications. Please keep in mind that the test is very not scientific.

As you can see, 1Password is the one that consumes the less RAM (they have a rust library and a light client). What will consume RAM with Electron is caused by Chromium, but the application that is run inside is much more impactful. 1Password did an excellent work and have a very light client that communicates with a light Rust backend.

App Tech Start RAM Logged RAM Storage MB
1password Electron 184 265 374.5
Proton Mail v0.1 Electron 203 375 221.1
Proton Mail v0.1 Tauri 273 364 41
Skiff React Native? 266 658 37.1
Slack Electron 327 546 766.9
Tutanota Electron 239 329 277.2
VS Code Electron 265 - 367.9