thunderbird freeze high CPU sorting Subject, Date or Correspondent - "Not Responding"
Categories
(Thunderbird :: Folder and Message Lists, defect, P1)
Tracking
(thunderbird_esr68 unaffected, thunderbird_esr78+ affected, thunderbird80 affected)
Tracking | Status | |
---|---|---|
thunderbird_esr68 | --- | unaffected |
thunderbird_esr78 | + | affected |
thunderbird80 | --- | affected |
People
(Reporter: krasnyitoster, Unassigned)
References
Details
(4 keywords)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
We have IMAP account and Thunderbird 78.1.0. There is about 50000 messages in INBOX. When I click to Correspondent, or Topic, or Data, Thunderbird will freeze on 1-5 minute or more.
Actual results:
Thunderbird will freeze for a long time (1-5 minutes or more for some users). If we delete Thunderbird and profile, install Thinderbird 86.10.0, configure profile, sorting will be work very quick. Problem is in Thunderbird 78.0.1, 78.1.0.
Expected results:
Thunderbird 78 should not freeze, when sorting many messages.
Comment hidden (duplicate) |
Comment 2•4 years ago
|
||
Please Start Windows' safe mode with networking enabled
- win10 https://support.microsoft.com/en-us/help/12376/windows-10-start-your-pc-in-safe-mode
Still In Windows safe mode, start thunderbird in safe mode - https://support.mozilla.org/kb/safe-mode-thunderbird
Any changes?
Also, how big are your address books?
Any calendar or LDAP?
Comment 3•4 years ago
|
||
Sounds like bug 1657034.
Reporter | ||
Comment 4•4 years ago
|
||
We tried to go Windows safe mode and run Thunderbird in safe mode. There is no changes. Sorting will freeze for a long time, or hang up at all.
By the way: we have a lot of computers in office. We have this problem on Windows 7 32-bit and Windows 10 at the same time. Problem only in 78 version of Thunderbird. We tried to install 68 version of Thunderbird and problem have gone. Address book is not very big (users have about 100-600 recipients). Problem is only if folder have many messages (30000 or more). I tried disable hardware acceleration in Setting, but it not help.
Configuration of computers: 3-4 GB DDR2 / DDR3, Pentium Dual-Core E5400-E5700 2.7-3.0 GHz.
Reporter | ||
Comment 5•4 years ago
|
||
We have not any calendar or LDAP.
Comment 6•4 years ago
|
||
(In reply to krasnyitoster from comment #0)
We have IMAP account and Thunderbird 78.1.0. There is about 50000 messages in INBOX. When I click to Correspondent, or Topic, or Data, Thunderbird will freeze on 1-5 minute or more.
Guess you mean Subject and Date in the message list.
I can easily reproduce this. 80.0b1, Macbook air, 25k message in folder, clicked correspondent (which I rarely do) - I'm waiting now several minutes. Basically hung.
Tested with 800 messages - there is a detectable delay (.5 - 1.5 sec) switching between correspondents and subject.
With 2.5k messages it was obvious - 1-2 seconds. It worked several times, but for some reason eventually hung after a two quick clicks - I think it was correspondent and then subject.
I had another go at the 800 message draft folder - flipping between subject and correspondent I got it to delay several seconds - which was more than the first test.
Comment 7•4 years ago
|
||
Alice, can you reproduce?
Not sure what we did in this area except bug 1626841.
Comment 8•4 years ago
|
||
I now think this is more likely to be contact / addressbook related - a caching issue maybe?
I cannot reproduce it when clicking between columns that don't involve contacts - for example size, subject, date
Comment 9•4 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #7)
Alice, can you reproduce?
Not sure what we did in this area except bug 1626841.
I cannot reproduce the issue.
There seems to be no difference in CPU load and processing time between 68 and 78.
Tested with imap inbox(190mails) and local folder(5370mails)
Comment 10•4 years ago
|
||
I'm also often seeing delays when deleting messages.
Walt or Eckard, do you have any folders in the over 2k range?
Comment 11•4 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #10)
I'm also often seeing delays when deleting messages.
Walt or Eckard, do you have any folders in the over 2k range?
Only one email, four newsgroup folders over 2k in TH 78.1.1.
TB 78.1.1 froze when I sorted my Bugzilla email folder by Correspondent, but doesn't appear to be reproducible after resorting by date.
Comment 12•4 years ago
|
||
https://github.com/thunderbird-conversations/thunderbird-conversations/wiki/Profiling-Conversation's-Performance describes the procedure for getting a performance profile. Let's compare results.
Comment 14•4 years ago
|
||
Profiles:
- a few seconds for 2500 messages - https://share.firefox.dev/2XI3cVB - Inbox, 2500 messages, sorted by subject, start profiler, then sort by correspondent, stop
- high gc/cc 1-2 minutes for 5000 messages - https://share.firefox.dev/3kr9faY - crash folder, 5000 messages, sorted by subject, start profiler, then sort by correspondent, stop
Note - case #2 was actually a short wait. Just previous to that I had caused Thunderbird to hang, and had to restart.
Possible complication - I'm finding google oauth2 prompt for accounts which are not logged in when I start the developer. I think it's hitting js that triggers checking these accounts for new messages. I see high CPU when oauth prompt is open.
Comment 15•4 years ago
|
||
As Wayne cc'ed me I took a quick look.
(In reply to Wayne Mery (:wsmwk) from comment #14)
- a few seconds for 2500 messages - https://share.firefox.dev/2XI3cVB - Inbox, 2500 messages, sorted by subject, start profiler, then sort by correspondent, stop
From a profile perspective, there isn't loads of processing in here. There's an ~800ms segment where TB is at 100% CPU, that mainly looks like the view sorting algorithm, and various calls to decode headers. This would need someone a bit more experienced/up to date with the views to look at.
- high gc/cc 1-2 minutes for 5000 messages - https://share.firefox.dev/3kr9faY - crash folder, 5000 messages, sorted by subject, start profiler, then sort by correspondent, stop
There's about 7s worth of CPU where javascript is running at 100% here. Probably around 300ms are the same as per the first case. Of the rest, there's a few interesting things:
- The
_prefBranch
anduuid
fields on the address book directory get called quite a bit ~1.3s worth for the_prefBranch
, though only 70ms worth foruuid
. These the patch in bug 1658062 should help. getIntValue
on the card is called a lot to get the position, ~672ms worth I think. This calls through to the _prefBranch to get an integer value - so caching the position rather than getting it every time would help a lot.cardForEmailAddress
takes ~1900ms, most of this isgetCardFromProperty
which is taking ~1500ms.- It looks like
cardForEmailAddress
may callgetCardFromProperty
twice, maybe unnecessarily especially as that makes two calls (could combine into one SQL). - May be worth considering the use of
db.executeCached()
here, places uses it a lot. I don't know if it will help or not, might be worth talking to some of the storage team about it.
- It looks like
- On top of those, it may be worth looking at what the DBViewWrapper is actually doing wrt the sort, and why it appears to get all the message fields again to do the sort. I don't know enough about it to know if this is just how the tree view works, or if there's something that could be done to cache/improve it.
For the rest of the time ~3 minutes, it looks like the garbage collector is cleaning up. I would expect that fixing some/all of the above should help that quite a bit. It'd certainly be interesting to see what impact landing bug 1658062 has on it.
Comment 16•4 years ago
|
||
(In reply to Mark Banner (:standard8) (afk until 13 Aug) from comment #15)
As Wayne cc'ed me I took a quick look.
(In reply to Wayne Mery (:wsmwk) from comment #14)
- a few seconds for 2500 messages - https://share.firefox.dev/2XI3cVB - Inbox, 2500 messages, sorted by subject, start profiler, then sort by correspondent, stop
From a profile perspective, there isn't loads of processing in here. There's an ~800ms segment where TB is at 100% CPU, that mainly looks like the view sorting algorithm, and various calls to decode headers. This would need someone a bit more experienced/up to date with the views to look at.
profile has:
14 address books with 2500 total contacts .
Corporate ldaps
Plus Mac AB? (0 contacts)
Note, I can make the 2500 message Inbox hang like case #2, but I didn't what to risk hanging thunderbird.
Updated•4 years ago
|
Comment 17•4 years ago
|
||
The fixed versions are 80.0b3 and yet to be released 78.2.0, available in a couple weeks. Sorry for the delay, we hoped to ship the fix sooner.
We have prerelease builds of 78.2.0 at
Linux 32 - https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Wt6njemRRLqPWTtBGwveeg/runs/0/artifacts/public/build/target.tar.bz2
Linux 64 - https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/c-hebGAgSa6vk4pho_Dzfw/runs/0/artifacts/public/build/target.tar.bz2
Win32 - https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Z1SJdZI5TXq0K7Hqx2dTRw/runs/0/artifacts/public/build/target.installer.exe
Win64 - https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/QDcMj6fmQRascf-69IqGqQ/runs/0/artifacts/public/build/target.installer.exe
Updated•4 years ago
|
Comment 18•4 years ago
|
||
krasnyitoster, how is version 78.2.0 for you?
Reporter | ||
Comment 19•4 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #18)
krasnyitoster, how is version 78.2.0 for you?
We are rolling out new version of Thunderbird. I will write later, when I get some statistics from users.
Thank you for help.
Reporter | ||
Comment 20•4 years ago
|
||
Seems to work fine. Thanks for help.
Comment 21•4 years ago
|
||
Thanks for the update
Description
•