bkaankose / Wino-Mail

Built-in Mail & Calendars app clone for Windows.
https://www.winomail.app/
GNU General Public License v3.0
709 stars 34 forks source link

[Bug] Excessive CPU usage in background #426

Open pohuing opened 1 week ago

pohuing commented 1 week ago

Describe the bug Wino uses a lot of power in the background for minutes after closing it to tray. This is 6-8% of a 12 Core 5900X, so that's 1-2 Cores @4.7Ghz.

Expected behavior Wino should not use much power in the background except for when syncing.

Screenshots Closed to Tray: grafik

In Foreground: grafik

Additional context The CPU load is comparable to syncing my email account. The lack of network usage shouldn't suggest that it's not syncing, since the connection is to my local protonmail bridge and windows doesn't show loopback traffic. This email account also has mail going over a decade back, so maybe it's just an issue of too much mail in the inbox, other clients deal with it fine however.

Tiktack commented 1 week ago

Looks weird. This is my Wino idle server image

This is during sync ( pressed sync button on UI) image

I have Snapdragon X Elite 80

pohuing commented 1 week ago

I tried to see if I can profile Wino.Server but I can't get Rider to to run since LaunchSecureProcess dies with an E_ACCESSDENIED, Is there a trick to this?

bkaankose commented 1 week ago

Imap synchronizer is definitely not the best version it can be right now. Depending on the server, I'm pretty sure that some servers are not handled well. It needs to be refactored.

Even though, taking %8-9 CPU usage is really high for what it is doing. I never used Rider for profiling as well so I can't really guide you on this unfortunately.

Running server alone may throw access denied because it's trying to access app package's directory, which you don't have access for if you run it outside of the packaging project. So your best shot is to run the packaging project if Rider supports it, and kill the client (app) later on.

VincePuc99 commented 5 days ago

Hi, hope i can help! Here's my CPU usage (5900x), done a 24h2 clean install two days ago. idle for ~5 mins.

Screenshot 2024-10-21 124109