Closed Bug 1860094 Opened 2 years ago Closed 4 months ago

Pane resizing is slow for a second or so before display update

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 115
Unspecified
All
defect

Tracking

(thunderbird_esr128+ fixed, thunderbird136 fixed)

RESOLVED FIXED
137 Branch
Tracking Status
thunderbird_esr128 + fixed
thunderbird136 --- fixed

People

(Reporter: lancelot, Assigned: darktrojan)

References

(Blocks 5 open bugs)

Details

(Keywords: perf:responsiveness, regression, Whiteboard: [has performance profile 128])

Attachments

(6 files)

Steps to reproduce:

On Debian Linux/XFCE, resize a pane by clicking on the horizontal pane border between either the message list (above) and one message (below) or by clicking on the vertical pane border delimiting folders (left) and messages (right).

Actual results:

Thunderbird display freezes for a second or so before display update.

Expected results:

Smooth resizing, as before (actually, this issue happened a few months ago, with a former version; also note that window resizing works fine, only pane resizing malfunctions).

FYI, I just noticed that the issue only happens in the email tab, not in the calendar tab whose panes resize smoothly.

Does the problem reproduce after Help > Troubleshoot mode?

Flags: needinfo?(lancelot)

Unfortunately yes, I already tried.

Flags: needinfo?(lancelot)
OS: Unspecified → Linux

Please install Thunderbird from https://www.thunderbird.net/en-US/ and please create a performance profile https://support.mozilla.org/en-US/kb/profiling-thunderbird-performance. Thanks

Flags: needinfo?(lancelot)

I suspect this is going to be the message list refreshing

Component: Mail Window Front End → Folder and Message Lists
Summary: Pane resizing is slow / freezes temporarily → Pane resizing is slow for a second or so before display update
Whiteboard: [closeme 2024-01-15]

debian folk,

Can you comment please - do you see the behavior of comment 0. "resize a pane by clicking on the horizontal pane border between either the message list (above) and one message (below) or by clicking on the vertical pane border delimiting folders (left) and messages (right)."

Yes / No ?

Flags: needinfo?(lancelot)
Whiteboard: [closeme 2024-01-15] → [closeme 2024-02-15]
See Also: → 1867219

A little update by the way:

  • I still observe the lag with version 115.6.0 on Debian + XFCE (X11, no Wayland).
  • I also notice that I can move smoothly the horizontal pane border between a message (above) and an attachment (below). This one works fine.

What message threading and sort setting are you using? Including, is group by sort enabled?

Most of the time, messages are sorted by date without message threading.

I rarely resize panes. I have tried on Debian 12 bookworm, KDE, X11, a folder with 100 messages. My observation is small delay that I may expect from events debounce (if thunderbird UI use it).

I have experienced issues with Firefox not updating its windows (e.g. switching to another tab) or popups for a few seconds. It happens in LXC containers with bind-mounted X11 sockets directory and /dev/dri. I have not figured out yet what may cause such delays.

Whiteboard: [closeme 2024-02-15]

The probem is still there (115.8.0).

I tried to disable display Total message count and Show folder size, on the left pane but it does not make any difference
(I don't know if this is relevant, but I have 20+ accounts on the left pane).

To comment on max who mentioned one folder with 100 messages: in my case, the lag happens even if
I have 5 messages in the account.

Hi Lancelot, I wasn't able to reproduce the issue. I have a Debian 12 VM with XFCE. From thunderbird.net, I downloaded the 115.8.0 tarball and ran that thunderbird executable. Attached you can see a short screen capture of thunderbird resizing window and there's no real lag I see.

@heather, thank you for trying to reproduce the issue. As @lancelot wrote “horizontal pane border”, I believe they use a different view. Also, you only have one message in the inbox. I’d suggest to populate it with at least a thousand test messages or so.

Comment on attachment 9389240 [details]
Screenshot_2024-03-04_22-58-16b.jpg

Thanks Heather. Indeed, as Paul noticed, I am using a different display.

Sorry, in the initial description, he said both...
" or by clicking on the vertical pane border delimiting folders (left) and messages (right)."

I tested the horizontal view too and still did not see the issue.

This is with x11.

@lancelot, I wonder if you watch your system's resources, are they spiking when you're trying to resize and you see the lag? When you say you're using a different display, do you mean a secondary monitor?
(In reply to Paul Menzel from comment #13)

@heather, thank you for trying to reproduce the issue. As @lancelot wrote “horizontal pane border”, I believe they use a different view. Also, you only have one message in the inbox. I’d suggest to populate it with at least a thousand test messages or so.

I can try with more messages but a thousand seems excessive since he said "in my case, the lag happens even if
I have 5 messages in the account."

@heather, as a matter of fact, you are right, it indeed also affects the vertical pane border.

Even after loading a second email account (that has 800 emails), and using the classic view with the horizontal line, I do not see a lag. I can't post a video of it since it's a real email account. So perhaps this has something to do with the number of accounts? I don't have 20+ accounts to test with. lancelot, do you see the issue if you run thunderbird with just one or two accounts?

I wrote "different display" to explain that a message actually appears below the list of message, not as in the video you posted. I am not using another screen.

Regarding resources, Thunderbird uses about 1.15Gb RAM (3,6% of 32Gb) and I do not see it spiking, nor the CPU (but the lag only happens for 1 second).

I created a Thunderbird account from scratch for another user and I do not see any lag there: the number of accounts may matter.

Right, I've tested the classic view (the second video I uploaded) as well. I continued to test the classic view (where the message is below the table of messages) when I added a second account.

This might be related to the fixes that we're introducing in bug 1883550.
It would be interesting to see if this problem goes away after that patch lands on Daily.

See Also: → 1883550

(In reply to Alessandro Castellani [:aleca] from comment #22)

This might be related to the fixes that we're introducing in bug 1883550.
It would be interesting to see if this problem goes away after that patch lands on Daily.

How can I test that?

Attached image column_resizing.jpg

Note that the lag also occurs whenever I resize any column withing the message list.
This happens even when there are only four messages in the list.

Depends on: 1883550
See Also: 1883550

Hi, I just wanted to add, that this is not just a linux issue. We are experiencing the same problem since the supernova update.
Resizing a panel or column always freezes the UI for about two seconds.

Forgot to mention that we are using Windows 10.

Are you still able to reproduce with 115.11?

Flags: needinfo?(lancelot)

(In reply to Alessandro Castellani [:aleca] from comment #27)

Are you still able to reproduce with 115.11?

I will tell you as soon as 115.11 is available on Debian.

Flags: needinfo?(lancelot)

(In reply to Alessandro Castellani [:aleca] from comment #27)

Are you still able to reproduce with 115.11?

Unfortunately, 115.11 doesn't seem to change anything :(

Please check version 128 late(r) this week and report results. Thanks.

Flags: needinfo?(lancelot)

lancelot, did you have good results?

Whiteboard: [needs performance profile]

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

lancelot, did you have good results?

I am currently using 115.14.0 and the lag is still there.

Flags: needinfo?(lancelot)

The lag is also there with Debian sid/unstable with gnome-shell 47~beta-1 and thunderbird 1:128.1.0esr-1.

Can youget a performance profile on version 128?

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)
Flags: needinfo?(lancelot)
Whiteboard: [needs performance profile] → [needs performance profile 128]

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

Can you get a performance profile on version 128?

Or, possible to try beta?
https://www.thunderbird.net/en-US/download/beta/

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

Can youget a performance profile on version 128?

Hi, as I said earlier, we have the same issue on Windows. This is my performance profile on Windows 11. Hope it helps.

https://share.firefox.dev/4f3SpKp

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

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

Can you get a performance profile on version 128?

https://share.firefox.dev/49syV0F

I hope this helps.

(now I am getting worried because, since last update or so, TB has becoming
slower and, every few minutes, seems to freeze for several seconds while CPU
is peaking, - maybe a different problem though ?)

Flags: needinfo?(lancelot)

Thank you for the profiles.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org) → needinfo?(geoff)
Whiteboard: [needs performance profile 128] → [has performance profile 128]

There's certainly something going on here. The resizing speed of these panes is less than ideal most of the time (because every time the pane moves we're updating the layout on thousands of HTML elements), but these profiles show a single layout calculation could take hundreds of milliseconds. That's not right.

I'll see if I can get some layout people interested in this bug.

Andreas, lancelot, I'm curious how large your screens are. When I resize the panes, the performance profile says 5000 elements were restyled. Your profiles say 170,000 and 70,000 elements.

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

Andreas, lancelot, I'm curious how large your screens are. When I resize the panes, the performance profile says 5000 elements were restyled. Your profiles say 170,000 and 70,000 elements.

Hi Geoff, in terms of resolution, I'm full HD 1920x1080 if it is what you're asking.

It is.

Okay that's weird. Mine is about the same size. I see no way you'd have 14 times as many messages fitting in the message list (there are some messages hidden off-screen, but that's the same number regardless of the size of the folder). Perhaps you have a very large number of folders? I can't think of anywhere else all of these elements could be from.

I'm on 1920 x 1080 as well. We do in fact have a very large number of folders, but I usually keep those collapsed. And the number of folders is definitely way below 70k. (I hope. I never dared to expand all those folders to see whats hidden behind)

It looks like the content of collapsed folders is not really hidden though, but just assigned a height of 0px. So once loaded they are actually part of the whole resize routine?

Out of curiosity I manually set all collapsed ul elements in the tree to display: none and that did the trick. Everything resizes smoothly.

That's interesting. There's ~10 elements per row, so with a very large number of folders that could explain it. And yes, the collapsed rows would be part of the calculation if they're not hidden completely. I think the reason for it is the gratuitous expand/collapse animation, but we could fix that to include setting display: none.

Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

We'll land this and close the bug as it seems likely to fix the issue. If not, let's create a new bug and try some more things.

I can't currently create a test build based on ESR 128, but when those builds are un-busted I'll create one for you to try.

No longer depends on: 1883550
See Also: 1867219
Target Milestone: --- → 137 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/5c52ab7964f5
Remove collapsed TreeList rows from layout calculation. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED

Here's a test build, based on 128.7.0 with the patch from this bug applied. Let us know if it helps or not.

Linux: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/XdvwLYvERYCbdtngZ5FMwA/runs/0/artifacts/public/build/target.tar.bz2
Windows 64-bit: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/EriLA-ZxQ96XhC2FuVESUQ/runs/0/artifacts/public/build/install/sea/target.installer.exe

You should either install in a different directory and start Thunderbird from the command line with the -P flag to choose the right profile, or reinstall an official build once you've finished.

Flags: needinfo?(geoff)

Comment on attachment 9463610 [details]
Bug 1860094 - Remove collapsed TreeList rows from layout calculation. r=#thunderbird-reviewers

[User impact if declined]

  • Users with lots of folders will see poor performance resizing the message panes.

[Is this code covered by automated tests?]

  • Yes.

[Has the fix been verified in Daily? (or Beta for an ESR uplift?)]

  • Yes, by myself and in 128 by Andreas (who couldn't respond here because the bug is closed, grrr…).

[Needs manual test from QA?]

  • No.

[List of other uplifts needed]

[Risk to taking this patch]

  • Low. There's no visible change for the user, but the performance is improved.

[Why is the change risky/not risky? (and alternatives if risky)]

  • No. It's messing with the display of the folder tree, but regressions would be pretty obvious.

[String changes made/needed]

  • None
Attachment #9463610 - Flags: approval-comm-beta?

I cannot see the bug anymore, neither in my dashboard, nor when I search it.
How can I access it again (apart from bookmarking this page)?

Comment on attachment 9463610 [details]
Bug 1860094 - Remove collapsed TreeList rows from layout calculation. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9463610 - Flags: approval-comm-beta? → approval-comm-beta+
Blocks: 1858030
Blocks: 1869745

Unlikely to be platform specific, so > OS=all

(In reply to lancelot from comment #50)

I cannot see the bug anymore, neither in my dashboard, nor when I search it.
How can I access it again (apart from bookmarking this page)?

Bookmark. Browser history. Notepad :)

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

We'll land this and close the bug as it seems likely to fix the issue. If not, let's create a new bug and try some more things.

I can't currently create a test build based on ESR 128, but when those builds are un-busted I'll create one for you to try.

128.8.0 is just around the corner - builds next week.

Severity: -- → S3
OS: Linux → All

Comment on attachment 9463610 [details]
Bug 1860094 - Remove collapsed TreeList rows from layout calculation. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr128

Attachment #9463610 - Flags: approval-comm-esr128+
Blocks: 1937931
Blocks: 1942491
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: