Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory usage #108

Closed
ask2018 opened this issue Feb 14, 2019 · 9 comments
Closed

Memory usage #108

ask2018 opened this issue Feb 14, 2019 · 9 comments
Labels

Comments

@ask2018
Copy link

ask2018 commented Feb 14, 2019

Are there any ways how to optimize the memory usage for the application or this is the prize for the way how it's working? Currently email-securely-app is the "always running application" with the most memory usage on my computer and its really far behind all the others. I have 3 protonmail accounts added and average total memory usage for all email-securely-app processes is between 700-800 MB. That's really lot for email application and it's for me atm only thing I don't like about it.

@vladimiry
Copy link
Owner

vladimiry commented Feb 14, 2019

In general, the memory consumption is an inevitable evil that comes with @electron platform. I think if you will open those 3 accounts in your browser at the same time, the browser also will be a resource consuming thing.

Disabling some features will allow saving some memory:

  • You can disable local store feature for the accounts. The app then will stop keeping the emails in memory and so the memory use by the main process will be reduced. The app by design flushes and loads to memory the database.bin file as a whole thing but not like encrypting only the specific columns of the database in an incremental way. It's of course not an optimal approach in terms of performance and resource/memory consumption but it allows keeping the metadata hidden. You can see some implementation details here. So the app by design keeps the full local store related database in memory.
  • You can disable full-text search feature so the respective process won't be created. This will save 80 MB at minimum and the maximum depends on how many emails you got in your accounts (search index storing matter).

The renderer process of a single Protonmail account added to the app takes about 200 MB of RAM, for Tutanota it's about 150 MB.

@ask2018
Copy link
Author

ask2018 commented Feb 14, 2019

Thank you for detailed answer. Local store I have already disabled. I've tried to disable the full-text search but not much difference. Yes in browser it's +- the same. So I guess this is the price for this way of solution. You can close the issue, if there is nothing about it you can do on this platform used. Thank you.

@vladimiry
Copy link
Owner

vladimiry commented Mar 1, 2019

@ask2018 I enabled optional GPU acceleration process disabling with this commit. This will allow you to save some memory.

Unfortunately GPU acceleration disabling is currently blocked by upstream/electron bug but I will let you know when they fix it.

@ask2018
Copy link
Author

ask2018 commented Mar 1, 2019

Ok great. Thank you.

@vladimiry
Copy link
Owner

@ask2018 see 2.3.3 release.

@ask2018
Copy link
Author

ask2018 commented Mar 4, 2019

Thank you. Testing version 2.3.3, but I don't see much memory usage difference. I've tried few times enable/disable the GPU acceleration with application restart and it was +- the same. Still usually between 700-800 MB, sometimes up to 900 MB for 3 protonmail accounts. If there are some differences, they are hardly noticeable in current memory usage ranges for the application.

@vladimiry
Copy link
Owner

vladimiry commented Mar 4, 2019

The GPU acceleration process normally consumes just about 50-100MB of RAM, so there won't be a huge difference but if the memory use is a concern then even such subtle improvement matters.

@ask2018
Copy link
Author

ask2018 commented Mar 4, 2019

Yes every memory save counts. That's true. But here I'm simply still in the same range of memory usage.
It varies more than 50-100 MB independently on that GPU acceleration settings for me. If I try blind test for that setting. I cannot say when it's on/off when I look just on memory usage, because sometimes there is more usage even with GPU acceleration turned off. For example if I maximize the window and then minimize back to tray. It's sometimes 100MB up and it stay there even if minimized back. As an example now there is 846 MB usage total with GPU disabled. Before there was 780 MB with GPU enabled. Before there was 750 MB if GPU disabled ect ect and If I restart it again. It's again little bit different.

@vladimiry
Copy link
Owner

vladimiry commented Mar 4, 2019

Enabling that option is up to you but it allows saving some RAM regardless of whether you see the difference since the GPU acceleration process won't be created if the option is enabled. Besides I discovered by experiment method that the amount of saved memory is directly proportional to the number of accounts added to the program. So on one account case, the difference is going to be really subtle, probably around like 40-50 MB.

You are writing about other types of processes, the renderer ones which can't be dropped without hurting the functionality as they basically do the same job your browser does. This is also why your browser will consume a similar amount of RAM if you run several accounts with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants