Closed Bug 1830145 Opened 2 years ago Closed 9 days ago

Hangs switching to unified folder inbox of 260k messages using folder mode settings, threads=All and `Search Online`. Also moving between folders in unified folder mode (example: from Inbox to Sent)

Categories

(Thunderbird :: Folder and Message Lists, defect, P3)

Thunderbird 102
x86_64
Windows 11

Tracking

(thunderbird_esr128+ affected, thunderbird134 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
thunderbird_esr128 + affected
thunderbird134 --- fixed

People

(Reporter: Aureliano, Assigned: darktrojan, NeedInfo)

References

Details

(Keywords: hang, perf, Whiteboard: [snnot3p][has profile])

Attachments

(1 file)

STRs:

  1. starts TB and switch to Unified Folders: there is a delay about 10"
  2. set message threads on and set to All;
  3. switch to All Folder view and toggle Unified Folders to off;
  4. close TB
  5. starts TB and switch to Unified Folders: there is a delay about 56"

Here profiling as permalink https://share.firefox.dev/40F0Y79

TB 113.0b4

Keywords: hang, perf
Whiteboard: [Supernova3p]
See Also: → 1817367

Aurelio, is it better in Beta 113.0b5 (64-bit) where bug 1817367 has been fixed?

Flags: needinfo?(euryalus.0)

Ciao Thomas, I don't know the answer, because until now I've tried bug #1817367 always with views-threads set to off. The observed result [with views-threads set to off], after the fix, is the one described in my comment https://bugzilla.mozilla.org/show_bug.cgi?id=1817367#c43
Trying (post fix) also with views-threads set to on, I encountered the performance problems described here.

Flags: needinfo?(euryalus.0)

I can confirm this issue also in 114.0a1 (2023-05-04) (64-bit)

The problem still persists in version 114.0beta3. Here the profiling result as permalink https://share.firefox.dev/42N6C9b
Related to nsThread::ProcessNextEvent ?

Severity: -- → S3
Priority: -- → P2
Whiteboard: [Supernova3p] → [Supernova3p][has profile]
Duplicate of this bug: 1836084
Summary: Switching to the unified folder inbox using folder mode settings hangs when message threads is set to All → Switching to the unified folder inbox using folder mode settings hangs when message threads is set to All. When in unified folder mode, moving between folders (example: from Inbox to Sent) hangs the same way

How many messages are we talking about here? From the profile's screen shots it looks like your combined inbox has a 5-figure total, but it's hard to tell. I've been testing with a combined 70,000 messages and the busiest functions in your profile are not problematic for me.

Are you also hitting bug 1836393? It looks like you might be, and that could be related. I don't see that problem either.

I don't suppose you know if the same problem existed in 102, do you?

(In reply to Geoff Lankow (:darktrojan) from comment #6)

How many messages are we talking about here?

Hi Geoff.
My 'Inbox on Unified Folders' has around 260k emails. This issue isn't a regression, because it behaves the same way in TB 102 as well.

Upon further investigation, I have verified that by selecting my 'Inbox on Unified Folders', there is high online traffic to my accounts' IMAP servers. Going to the 'Inbox on Unified Folders' virtual folder, I saw that the option 'Search Online (Gives up-to-date results for IMAP etc...)' is selected by default. By setting 'Search Online (Gives up-to-date results for IMAP etc...)' to false, I no longer have the performance problems mentioned here.

This ticket should be considered Invalid, as the performance of a search on an IMAP server depends on the IMAP server itself and not from TB?
For end users, it should be documented that in the 'Inbox on Unified Folders', the flag 'Search Online (Gives up-to-date results for IMAP etc...)'
is it true by default so there might be performance issues with large Inboxes?
Other ideas?

Thank you.

Aureliano, thanks for the update.

Dropping from supernova list based on comment 7

Priority: P2 → P3
Whiteboard: [Supernova3p][has profile] → [snnot3p][has profile]
Version: Thunderbird 113 → Thunderbird 102

Aureliano, Does this happen with latest beta?

Flags: needinfo?(euryalus.0)

(In reply to Wayne Mery (:wsmwk) from comment #9)

Aureliano, Does this happen with latest beta?

Unfortunately no, the problem is still here and makes the Unified Folders mode unusable in my case.
118.0b4 (64-bit) on Windows 11

Flags: needinfo?(euryalus.0)

(In reply to [:Aureliano Buendía] from comment #10)

(In reply to Wayne Mery (:wsmwk) from comment #9)

Aureliano, Does this happen with latest beta?

Unfortunately no, the problem is still here and makes the Unified Folders mode unusable in my case.
118.0b4 (64-bit) on Windows 11

For every unified folder type?
Tried repairing any of the subfolders?

Flags: needinfo?(euryalus.0)

Using config editor try setting mail.db.max_open and mail.db.idle_limit to larger values. For example doubled.

See Also: → 1844381
Blocks: 1860529
No longer duplicate of this bug: 1836084

Basically 100% of the activity is DOM related, specifically the stack is
nsMsgSearchDBView::AddHdrFromFolder
nsMsgSearchDBView::MoveThreadAt
nsMsgDBView::CollapseByIndex
nsMsgSearchDBView::RemoveRows
nsCOMArray_base::RemoveObjectAt
...

So changing mail.db.max_open or mail.db.idle_limit will not help here.

Flags: needinfo?(euryalus.0)
Summary: Switching to the unified folder inbox using folder mode settings hangs when message threads is set to All. When in unified folder mode, moving between folders (example: from Inbox to Sent) hangs the same way → Switching to unified folder inbox of 260k messages using folder mode settings hangs when message threads is set to All. When in unified folder mode, moving between folders (example: from Inbox to Sent) hangs the same way

Aureliano, to what degree do you still see this problem?

Flags: needinfo?(euryalus.0)

Hi Wayne, 'Unified Folders' continues to be unusable in production also fro TB 126.0b1 (64-bit) on Windows 11. Here the profiling result as permalink https://share.firefox.dev/3Uc3jFv

Flags: needinfo?(euryalus.0)
Flags: needinfo?(euryalus.0)
Summary: Switching to unified folder inbox of 260k messages using folder mode settings hangs when message threads is set to All. When in unified folder mode, moving between folders (example: from Inbox to Sent) hangs the same way → Switching to unified folder inbox of 260k messages using folder mode settings hangs with message threads=All and `Search Online`. Also moving between folders in unified folder mode (example: from Inbox to Sent)

(In reply to Wayne Mery (:wsmwk) from comment #16)

Is it still true that this only happen when you have Search Online enabled? (which is the default)

Yes, it is.

Flags: needinfo?(euryalus.0)

Does it help to disable status bar at View > Toolbars ?

Flags: needinfo?(euryalus.0)
See Also: → 1098069, 1757315
Summary: Switching to unified folder inbox of 260k messages using folder mode settings hangs with message threads=All and `Search Online`. Also moving between folders in unified folder mode (example: from Inbox to Sent) → Hangs switching to unified folder inbox of 260k messages using folder mode settings, threads=All and `Search Online`. Also moving between folders in unified folder mode (example: from Inbox to Sent)

No Wayne, I have the same problem even without status-bar: TB in that case is not usable.
TB 126.0b3 (64-bit) on Windows 11

Flags: needinfo?(euryalus.0)

Aureliano, does this still reproduce for you when using a current beta?

Flags: needinfo?(euryalus.0)

Hi Wayne, still unusable. TB 133.0b5 (64-bit) on Windows 11
https://share.firefox.dev/3YX9cbO here the permalink for profiling the issue.

Flags: needinfo?(euryalus.0)

I think I can virtually eliminate the big grey chunks in that profile. nsMsgDatabase::GetSearchResultsTable is called over and over again and I can't think of a reason why we'd expect a different result, so let's do it once and remember the result. I'm running all of our tests to find out if that breaks anything.

Assignee: nobody → geoff
Status: NEW → ASSIGNED

Let's get this shipped. It fixes the larger part of the problem. I'm not sure what we can do about the other part which is the ordering of search results. Fortunately this problem will disappear when we get our new database.

Thanks for your patience Aureliano. Hopefully this will feature will be somewhat more bearable for you.

Target Milestone: --- → 135 Branch

Pushed by sean@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b912eb902e6d
Cache search results tables and charsets. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED

Geoff, ready to uplift this to beta?

Flags: needinfo?(geoff)

Comment on attachment 9439925 [details]
Bug 1830145 - Cache search results tables and charsets. r=#thunderbird-back-end-reviewers

[Approval Request Comment]
Regression caused by (bug #): always like this
User impact if declined: huge virtual folders could be very slow for no real reason
Testing completed (on c-c, etc.): it's been on central 6 days but there's not actually been a Daily build with it
Risk to taking this patch (and alternatives if risky): low

Flags: needinfo?(geoff)
Attachment #9439925 - Flags: approval-comm-beta?

Comment on attachment 9439925 [details]
Bug 1830145 - Cache search results tables and charsets. r=#thunderbird-back-end-reviewers

[Triage Comment]
Approved for beta

Attachment #9439925 - Flags: approval-comm-beta? → approval-comm-beta+

Hi Geoff, I did tests on 134.0b3 (64-bit) Windows 11 Pro: it's much better but it's still not usable in a production environment. Looking forward to releasing of new database structure. Thanks!

(In reply to Geoff Lankow (:darktrojan) from comment #24)

I'm not sure what we can do about the other part which is the ordering of search results. Fortunately this problem will disappear when we get our new database.

Thanks Geoff. What ordering are you referring to, something happening in mork? Or Gloda?

Good enough for now for 128?

Flags: needinfo?(geoff)

Aureliano, thanks for that feedback.

Have a look at https://mzl.la/4gjtDa9 - are there any that at least partly describe what remains of problem?

Flags: needinfo?(euryalus.0)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: