vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.48k stars 96 forks source link

Better RAM optimization (2 emails = 1.2GB RAM) #622

Closed evilsh3ll closed 1 year ago

evilsh3ll commented 1 year ago

Hello, I noticed the ram consumption is too much, I added 4-5 proton emails and I wasted 1.8 -1.9GB of ram. Using only 2 emails (the strictly needed) I lose 1.2GB of RAM. I use the latest version of electronmail (5.1.8-1) in ArchLinux installed via AUR. image

Is there any chance to optimize the memory usage? The full XFCE desktop environment is lighter 😔

vladimiry commented 1 year ago

There was a clear memory leak bug before, and it got fixed, for quite some time now. The memory use is a result of technologies choice and app's local store opt-in feature design (you seem to have this feature enabled). The technologies choice is a part of striking a balance between delivering and dropping project support.

Completing #571 would allow significantly reducing memory use by a "main" process (671MB in your case), as the local store related data won't be stored in memory anymore. Besides, the full-text search indexing process would be dropped (likely 175.9MB related process in your case), as SQLite itself would be handling indexing. But other processes not going to be affected in terms of continuous memory use.

vladimiry commented 1 year ago

The full XFCE desktop environment is lighter

Consider looking up on the internet what @electron is. The short story, it enables faster delivery in most cases, even for enterprise grade companies and big teams, but memory use is what you pay in many cases.