memory eating #170
Labels
No Label
IMAP
JMAP
Maildir
Retired
User Experience
User Interface
bsd
bug
contacts
currently worked on
documentation
duplicate
easy
enhancement
help wanted
invalid
linux-gnu
macos
mbox
notmuch
question
security
wishlist
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: meli/meli#170
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
That is intentional, after the 'RAM not used is RAM wasted' philosophy. Every mailbox loaded is kept in memory. But there should be a way to configure this, maybe make it opt-in so there are no surprises there. Let's add a config flag to tune the memory behavior?
I don't think that's what people expect from a program in Rust
I expected it to take up less memory than
aerc
. I would prefer to useThunderbird
since it consumes almost half as much memory.Yeah I don't disagree with you, I explained what was the motivation (I have 32GB RAM) but RAM abundance is not something you can count on for every user. It has to be fixed to be opt-in instead.
After some investigation, we can separate the logic of fetching a Mailbox and just updating its unread/total counts in order to prevent loading it in memory needlessly.
Ughm, turns out that wasn't the culprit. Caching the terminal mailbox list in memory was what is taking most of RAM. I was able to get a release build running with just 83 MB RAM usage after removing the cached views and just redrawing the terminal on every page draw.
Hey @epilys, did you push this massive RAM improvement? I don't see a commit reference, hence the question.
No not yet. Busy with work. I'll update this thread when I do!
I pushed a change for the conversations view here
8563bccd1b
It is in master. But I haven't changed the other views (compact, threaded) because they are column based and the code logic is different. The difference in RAM for me is big though.
I'm using conversations on a machine, but I didn't notice that much difference in RAM usage in my case. Conversations doesn't seem very stable too, because sometimes when I select an e-mail with Enter, the content flashes open and close on the side, then to actually bring it up I press p, and it's shown. It seems to often happen with html only emails that go through w3m, but I'm not sure.
I've noticed this as well but left it half-done because of day job. The area redraws are not done correctly when an email is open. Is it easy to get some RAM usage numbers before and after this commit? Essentially it removed a big
Vec<Cell>
that for thousands of emails got huge.Something happened in latest changes that had an effect, I now do see a drastic drop in RAM numbers (from ~600MB to <100MB). So I guess no need for worries on that.
Awesome, now I have to remove all those
Vec<Cell>
from everywhere, it was a premature optimization that actually called RAM problems.