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

Using 1.2-3GB ram on Windows 10 with Local store enabled #372

Closed
prestr opened this issue Feb 17, 2021 · 3 comments
Closed

Using 1.2-3GB ram on Windows 10 with Local store enabled #372

prestr opened this issue Feb 17, 2021 · 3 comments

Comments

@prestr
Copy link

prestr commented Feb 17, 2021

What can I do or provide to help fix this?

When I have Local store enabled the app use a lot of memory. I've confirmed it has downloaded all the emails (8000 emails - 500mb) and isn't flashing the icon.

As soon as I turn Local store off and restart the app its back down to 100-300mb of Ram.

v4.10.1
Windows 10 - 20H2 (19042.804)

NOTE: I also see it running 7 processes regardless if local store is enabled or not. Not sure if that's relevant.

@vladimiry
Copy link
Owner

vladimiry commented Feb 17, 2021

This is by design. The app stores the local store-related data encrypted as a blob (a bunch of bytes) which means the locally stored data is fully encrypted including the metadata (in regular databases for example the columns list or rows count would normally remain unencrypted). This also means that the data will be loaded into the memory in full. I understand that this approach won't please everyone. This way also simplifies the full-text search implementation.

See related note posted in the readme / FAQ:

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. It's of course not an optimal approach in terms of performance and resource consumption but it allows keeping the metadata hidden. You can see some details here.

As soon as I turn Local store off and restart the app its back down to 100-300mb of Ram.

Exactly since this action empties the data from the database.bin file.

@prestr
Copy link
Author

prestr commented Feb 17, 2021

Thanks @vladimiry for the answer. That's fine on my PC with 32GB ram but this now explains why my Mac's with 8GB ram where dieing while running ElectonMail and other apps, there wasn't enough memory. I've switched it off on the Mac's. 👍

@vladimiry
Copy link
Owner

vladimiry commented Feb 17, 2021

this now explains why my Mac's with 8GB ram where dieing while running ElectonMail

Try running the app on mac with the --js-flags="--max-old-space-size=4096"-like argument (where 4096 is ~ 4GB). The default max-old-space-size value is about 2048 and so the app will just crash if there is no enough memory. For linux and windows versions I've hardcoded the 6144 value in shortcuts but I have not yet found the simple way to override the defaults for mac system (@electron has the respective issue placed but it remains unresolved).

@Nothing4You Nothing4You mentioned this issue Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants