Mailspring: HIGH CPU USAGE

Created on 29 Jan 2019  路  19Comments  路  Source: Foundry376/Mailspring

The CPU is always 80% used only by Mailspring (Intel Core i9-7920X X-Series )

All i have is 3 email accounts.

/bin/bash /snap/mailspring/309/usr/share/mailspring/resources/app.asar.unpacked/mailsync --mode sync --info MYMAIL1
/bin/bash /snap/mailspring/309/usr/share/mailspring/resources/app.asar.unpacked/mailsync --mode sync --info MYMAIL2
/bin/bash /snap/mailspring/309/usr/share/mailspring/resources/app.asar.unpacked/mailsync --mode sync --info MYMAIL3

Maybe the problem is because each account has around 139.000 emails?

This is a problem because the sync is running i background and cannot control it ( just kill the process) not doing a good usage of IMAP IDLE.

Any idea or future patch to solve this problem?

thank you.

needs-reproduction performance

Most helpful comment

Same problem here. I had to uninstall because the CPU usage (and overheating) was a real problem.

All 19 comments

Hey! Mailspring will run quietly (via IMAP IDLE) once it's completed a scan of your mailboxes for search. Before it starts idling on the mailbox, it fetches headers + subject lines for every message in your mailbox. It usually goes pretty quickly, but with 139,000 emails and a slowish IMAP server, it could take 6+ hours. The UI in the bottom left of the app should let you know when it's done and is idling.

Sorry for the hassle! If you keep seeing this CPU usage after ~24 hours of Mailspring running let me know - looking at the Mailsync logs (from the developer menu) will show any errors it's encountering and we can see if it's stuck in a loop of some sort (maybe? haven't seen that happen in a while...)

I am also experimenting this problem. Mailspring always uses one CPU core to the 100%, draining the battery of my laptop (I cannot have it opened in the background). I have three google accounts and one outlook account. Sometimes it stops for a while, but after a few minutes or hours, starts again.

I've been experiencing this for a few months now, so I don't think it's just a matter of waiting a few hours.

I am getting this as well but only occasionally.

I am also experiencing a rather high CPU usage that forces my laptop to heat up tremendously. In my case, it's only noticed when connected to wi-fi. For context, the bottom UI states "Syncing your mailbox..."; however, all folders are filled green and there is one instance that states at the top, "Applying labels... (1)" that does not change count if this helps.

Yes, I really like Mailspring but the CPU usage is a problem.

Same problem with the lastest version on Arch with GNOME. Even there no mails in inbox. CPU usage is still high.

I have this issue, but only when I am replying to an email as I type it gets slower and slower. CPU goes to 100%, when I stop it goes back to normal. its the Mailspring Default process.

I have same Gmail inbox over IMAP and it also causes all 4 cores to go full 100% for few minutes when checking new messages. IMAP must be optimised in order for this mail client to be considered a pro (paid) and not a hobby (free) app.

Same problem here. I had to uninstall because the CPU usage (and overheating) was a real problem.

Same here with Solus. CPU gets to 100% when sending an email or during synchronizations, and still high CPU use even when Mailpile does not seem to be doing anything.

Same thing here with an ms exchange account via davmail on a linux box. Mailspring also causes davmail to have a high CPU usage, as if it was constantly fetching / sending mails or something. And, it's probably related, "scanning messages" shows for all folders and has not progressed beyond 6% for the Archive folder since I installed mailspring a couple weeks ago...

Here it maxes out one core for a couple of minutes. Then it goes down for a couple of seconds and then right back up to 90% again. But, its not constant. It does drop off, at least for a little bit, every now and then.

It is very noticable, as the fan on the CPU maxes out very loudly. Then suddenly becomes quite for a couple of minutes, then goes right back up again.

Edit: A couple of days later the intermittent high CPU usage have gone away. I am not sure what has changed.

same issue here..

Selection_239

gnome with latest mailspring

Feeling this, too. Mailspring normally runs at 25-30% on my i7 mbp and routinely jumps up to 100-200%+ for minutes at a time.

Recent experiments while traveling shows that shutting down Mailspring is a quick hack to double my battery life.

Happy to help debug this if i can.

FWIW I run 7 mailboxes, a couple of them pretty old. All gmail/google apps. A several GB of email in some, but a couple are nearly empty.

Just after a booting of a computer, Mailspring went crazy.
image
It's like a random generator decided to check for an email.
By the way, one of two Google's inboxes contained few new unread messages at that moment, but I didn't see them in the client. May be this high load relates to unsuccessful attempts to read an inbox.
I understand that no logs means no solution, but may be such info will help.
After I quit from the app and restarted it, everything was fine, and new messages were downloaded.

Kernel: 5.6.15-1-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.18.5 Distro: Manjaro Linux 

The app was built from AUR ver 1.7.8-1

I met this issue too, and it seems pretty much caused by mailspring gathering large quantities of emails from the net. When I added my different mailboxes, some pretty large with many years of emails, several threads popped up (named "main", would be cool to have more significant names ;) ) that did together eat up quite a lot of CPU (70 or 80%). After a couple of hours, all emails got imported, all the extra threads finished, leaving mailspring running only one thread that consumes a totally normal amount of resources (2% CPU). So this seems mostly like a "first launch" issue

I just installed Mailspring as Thunderbird stopped working for me, I really like Mailspring, but met this issue too. I'm considering uninstalling it if this can't be solved in a month or so.

I think there can be a lot of people switching to Mailspring with huge amount of legacy messages in their account. I guess the Pro users Mailspring Pro is targeting, may have developed good habit of archiving historic messages to relieve the scanner/indexer, making this issue of less priority for the team, it's pity but I can understand.

I do software engineering myself, but just a light email user, so hesitate to make contribution improving this issue. With uneducated guess, I think there may be spin-locks somewhere in scanning messages over IMAP, hope it helps a tiny bit.

Came back nearly a year later thinking this would be resolved :-(

For all concerned.
In my case this problem has gone in some weird way. First I installed KDE and tried Mailspring there (with all possible tricks to solve it). Then i3 (but I doubt this somehow relates). Then I wanted to try Materia Shell and installed GNOME. GNOME didn't satisfy me, and I got back to i3 ... and the problem had gone!
This is only a speculation, but I think this is a workaround: install GNOME first, then your desired DE, and Mailspring. For me it worked in Manjaro.

PS Sorry for reddit-like post.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

applesea2 picture applesea2  路  3Comments

purefan picture purefan  路  3Comments

KristerV picture KristerV  路  3Comments

jerry79 picture jerry79  路  3Comments

enoversum picture enoversum  路  3Comments