Open Bug 1456581 Opened 6 years ago Updated 2 years ago

Gmail Sent folder locks up browser for minutes

Categories

(Core :: Layout: Text and Fonts, enhancement, P3)

x86_64
Windows 10
enhancement

Tracking

()

Performance Impact low

People

(Reporter: gcp, Unassigned)

Details

Attachments

(2 files)

Attached file profile.json
Clicking on some emails in my Gmail sent folder locks up the tab for over a minute.

It looks like Thunderbird tried to save a GPG encoded draft (of a large mail with pictures) and it stuck there. Gmail displays the contents when opening the mail thread. Our rendering of such is...not fast.

Profile is attached. Seems we lock up for 92 seconds in layout.
I tested Chrome, and while it's not exactly fast here, it displays the Gmail page (instead of a spinner) in about 5 seconds, and finishes in about 15 seconds.
The profile isn't very actionable... It shows PresShell::DoReflow takes 20s, but nothing about what's happening inside.

It would be great if you have a profile which can show more details inside that.
Any advice how to do that?
I actually have no idea why your profile doesn't have anything inside. It normally should have deeper stack information unless everything happens in PresShell::DoReflow directly, which is unlikely.

Could you probably try reproducing this on a nightly build and capture a profile?
The profile was captured on a Nightly build :-/
Hi gcp, thanks for reporting. Can you capture another profile, and upload it to perf.html please? It's kinda hard to work with profiles as bug attachments.
Flags: needinfo?(gpascutto)
Profile uploaded here:
https://perfht.ml/2rsjZMg
Flags: needinfo?(gpascutto)
Flags: needinfo?(mconley)
The new profile shows 47s under reflow marker, in which nsLineBreaker::FlushCurrentWord takes 25.3s, nsLineBreaker::AppendText takes 7.6s. Sounds like we have some trouble with line breaker here. nsTextFrameUtils::TransformText also takes 2.2s.

We are probably calling nsTextFrame::EnsureTextRun too much? The total time under nsTextFrame::EnsureTextRun is 46.7s, which is almost all of the sampled 47s, so it is probably an issue in text layout.
Component: Layout → Layout: Text
It would probably be useful if you can share the content of the email... the encrypted form is probably enough if that's what causing this issue. Probably upload the email as attachment here?
Priority: -- → P3
Attached file hang.eml
Trying to copy-paste it locked up Chrome, so clearly this isn't exactly an optimized path in any browser.
Looks like xidorn beat me to the analysis.
Flags: needinfo?(mconley)
Whiteboard: [qf] → [qf:f64][qf:p3]
Whiteboard: [qf:f64][qf:p3] → [qf:p3:f64]
Whiteboard: [qf:p3:f64] → [qf:p3]
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: