Fix message list data properties and styles not correctly applied on startup
Categories
(Thunderbird :: Folder and Message Lists, defect, P1)
Tracking
(thunderbird_esr115 unaffected, thunderbird125 affected)
Tracking | Status | |
---|---|---|
thunderbird_esr115 | --- | unaffected |
thunderbird125 | --- | affected |
People
(Reporter: aleca, Assigned: aleca)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
When launching Thunderbird, a stack trace for each of the message rows can be observed.
chrome://messenger/content/thread-card.mjs 81 set index
chrome://messenger/content/tree-view.mjs 1258 _addRowAtIndex
chrome://messenger/content/tree-view.mjs 1086 _ensureVisibleRowsAreDisplayed
chrome://messenger/content/tree-view.mjs 710 reset
chrome://messenger/content/tree-view.mjs 584 set view
chrome://messenger/content/about3Pane.js 4552 setTreeView
chrome://messenger/content/mailCommon.js 988 onCreatedView
resource:///modules/DBViewWrapper.sys.mjs 1544 _applyViewChanges
resource:///modules/DBViewWrapper.sys.mjs 1272 _enterFolder
resource:///modules/DBViewWrapper.sys.mjs 864 open
chrome://messenger/content/about3Pane.js 2511 _onSelect
chrome://messenger/content/about3Pane.js 1540 handleEvent
chrome://messenger/content/about3Pane.js 144
After a few seconds (inconsistent, sometimes it's 1 second, sometimes it's 2), another stack trace is triggered forcing all messages to be set again.
chrome://messenger/content/thread-card.mjs 81 set index
chrome://messenger/content/tree-view.mjs 1258 _addRowAtIndex
chrome://messenger/content/tree-view.mjs 1086 _ensureVisibleRowsAreDisplayed
chrome://messenger/content/tree-view.mjs 710 reset
chrome://messenger/content/mailCommon.js 1049 onMessagesLoaded
resource:///modules/DBViewWrapper.sys.mjs 1263 _enterFolder
resource:///modules/DBViewWrapper.sys.mjs 1250 _folderLoaded
resource:///modules/DBViewWrapper.sys.mjs 237 onFolderEvent
I noticed this because some data properties needed on the tree view weren't being applied right away.
The missing data attributes are due to the lack of window.threadPane.restoreThreadState();
in onCreatedView(), which is called in the first stack. The following stack uses onMessagesLoaded()
, which applies all the correct styles.
Assignee | ||
Comment 1•6 months ago
|
||
Updated•6 months ago
|
Assignee | ||
Comment 2•6 months ago
|
||
Uploading an initial patch which takes care of missing style and some visual improvements.
Asking for some help in investigating this.
John, Hartmut, you've been doing some work recently on mailCommon
and dbViewWrapper
.
Could you investigate when the "folder loading twice at startup" issue started appearing?
This is a pretty noticeable performance regression.
Assignee | ||
Comment 3•6 months ago
|
||
Landing this initial fix and clean up, but leaving it open since the core problem still persists.
Comment 4•6 months ago
|
||
See bug 1875655.
Comment 5•6 months ago
|
||
(In reply to Alessandro Castellani [:aleca] (PTO March 18-22) from comment #0)
The missing data attributes are due to the lack of
window.threadPane.restoreThreadState();
in onCreatedView(), which is called in the first stack.
This had been changed in bug 1875577 to workaround the performance problem with Grouped by Sort in Expand-All state.
Regarding the "folder loading twice at startup" issue, I don't think there has been changed anything in the logic how this is handled in DBViewWrapper
for quite some time.
Pushed by martin@humanoids.be:
https://hg.mozilla.org/comm-central/rev/1f0e21441163
Ensure tree table attributes are applied early, and improve the style of the Grouped by Sort headers. r=darktrojan
Updated•6 months ago
|
Assignee | ||
Comment 7•6 months ago
|
||
(In reply to Hartmut Welpmann [:welpy-cw] from comment #5)
This had been changed in bug 1875577 to workaround the performance problem with Grouped by Sort in Expand-All state.
Could you check if this change is regressing some of the performance aspects you tackled in that bug? https://hg.mozilla.org/comm-central/rev/1f0e21441163#l2.12
Comment 8•6 months ago
|
||
(In reply to Alessandro Castellani [:aleca] from comment #7)
(In reply to Hartmut Welpmann [:welpy-cw] from comment #5)
This had been changed in bug 1875577 to workaround the performance problem with Grouped by Sort in Expand-All state.
Could you check if this change is regressing some of the performance aspects you tackled in that bug? https://hg.mozilla.org/comm-central/rev/1f0e21441163#l2.12
Yes, with the latest artifact build, I tested a unified folder combining two local folders with more than 8000 messages in total, sorted by correspondents and grouped by sort. Selecting the folder in collapse-all state takes less than 2 sec, while in expand-all about 60 sec. After backing out this revision it is less than 2 sec in both cases. In a real folder with about 8000 messages there is no noticeable difference with or without this change.
BTW, something seems to be not quite right with the sort menu, sometimes the sort indicator is missing, and changing the sort (even by clicking the column header) doesn't work right away sometimes, but that seems to be independent of the changes in this revision.
Assignee | ||
Comment 9•6 months ago
|
||
(In reply to Hartmut Welpmann [:welpy-cw] from comment #8)
(In reply to Alessandro Castellani [:aleca] from comment #7)
Yes, with the latest artifact build, I tested a unified folder combining two local folders with more than 8000 messages in total, sorted by correspondents and grouped by sort. Selecting the folder in collapse-all state takes less than 2 sec, while in expand-all about 60 sec. After backing out this revision it is less than 2 sec in both cases. In a real folder with about 8000 messages there is no noticeable difference with or without this change.
Thanks, I will do a follow up and ping you during the review so we can find a good solution.
BTW, something seems to be not quite right with the sort menu, sometimes the sort indicator is missing, and changing the sort (even by clicking the column header) doesn't work right away sometimes, but that seems to be independent of the changes in this revision.
How old was your artifact?
Yesterday we land this fix for the sorting options, maybe it's related? https://hg.mozilla.org/comm-central/rev/4b3cd106f5c74e30da6ad8ad89fe632f962c9990
Comment 10•6 months ago
|
||
(In reply to Alessandro Castellani [:aleca] from comment #9)
How old was your artifact?
Yesterday we land this fix for the sorting options, maybe it's related? https://hg.mozilla.org/comm-central/rev/4b3cd106f5c74e30da6ad8ad89fe632f962c9990
Pulled and updated to https://hg.mozilla.org/comm-central/rev/02e053a8f57be4de6180effddabaf7f0dea2bddc, so that one was already included ...
Assignee | ||
Comment 11•6 months ago
|
||
Ah, damn.
Can you open a bug and ping Geoff (darktrojan) and John (TbSync) on it? Maybe we missed something.
Comment 12•6 months ago
|
||
(In reply to Alessandro Castellani [:aleca] from comment #11)
Ah, damn.
Can you open a bug and ping Geoff (darktrojan) and John (TbSync) on it? Maybe we missed something.
Will do later this evening.
By the way, just limiting this to real folders should fix the performance issue, while keeping the visual improvements.
Updated•6 months ago
|
Assignee | ||
Comment 13•6 months ago
|
||
Indeed, I forgot to add the condition for synthetic views.
I added it back and it solved the issue.
New patch coming up soon.
Assignee | ||
Comment 14•6 months ago
|
||
Updated•6 months ago
|
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Comment 15•6 months ago
|
||
Marking this to be closed after it lands since it tackles only styling and the message list loading twice is a completely different issue.
Comment 16•6 months ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9be00f53256c
Ensure we don't try to restore expanded/collapsed state for synthetic views. r=vineet,welpy-cw
Assignee | ||
Updated•6 months ago
|
Comment 18•4 months ago
|
||
So this will help some cases of slowness when switching folders?
Comment 19•4 months ago
|
||
Should it also help when the message list is being updated during the receipt of new messages?
Assignee | ||
Comment 20•4 months ago
|
||
I don't think these things are related.
The issue here was mostly visual and not getting the correct properties to style the list if we were in grouped by sort or threaded.
Description
•