trying to View Source on twitter.com stalls out entire content process (spending lots of time in nsBidiPresUtils::TraverseFrames->nsBidiPresUtils::ResolveParagraph->SplitInlineAncestors)
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
Performance Impact | low |
Tracking | Status | |
---|---|---|
firefox70 | --- | fix-optional |
firefox71 | --- | affected |
People
(Reporter: potch, Unassigned)
References
(Blocks 2 open bugs, )
Details
(Keywords: perf, Whiteboard: [sci-exclude])
Attachments
(2 files)
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Updated•7 years ago
|
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Comment 5•7 years ago
|
||
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 9•7 years ago
|
||
Updated•7 years ago
|
![]() |
||
Comment 10•7 years ago
|
||
![]() |
||
Comment 11•7 years ago
|
||
![]() |
||
Comment 12•7 years ago
|
||
![]() |
||
Comment 13•7 years ago
|
||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Tagging this for re-triage since it blocks the async-tab-switcher meta.
Updated•6 years ago
|
Comment 16•6 years ago
•
|
||
This came up in QF triage, and some folks couldn't reproduce, but I actually am still seeing several-second load times and reflows when view-sourc'ing the attached testcases (and the not-logged-in twitter.com front page), so I think this is still a valid bug.
[:darkspirit], why is this connected to async-tab-switcher? AFAICT, this is just one possible (and particularly-niche) way to trigger a slow reflow (and hang the content process in question. Is every "hang-the-content-process-for-a-bit" bug an async-tab-switcher blocker?
Comment 17•6 years ago
|
||
For reference (and just to have up-to-date data), here's a profile of me doing view-source on testcase 2 here: https://perfht.ml/2LMpYVM
Updated•6 years ago
|
Comment 18•6 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #16)
[:darkspirit], why is this connected to async-tab-switcher?
I don't know: https://bugzilla.mozilla.org/show_bug.cgi?id=1460123#a1173614_219124
Comment 19•6 years ago
|
||
Thanks, darkspirit.
dao, looks like this bug here is marked as blocking async-tab-switcher by virtue of you having marked bug 1460123 as blocking async-tab-switcher (below bug 1460123 comment 2), and then that bug later being duped to this one.
Do you still think it makes sense for these bugs to be tied to async-tab-switcher? Put another way: does it make sense for the async-tab-switcher metabug to depend on every bug that's filed for a content-process-hang that's long enough to manifest in a spinner on tab-switch, if the switched-to-tab happens to share the hung content process?
(My guess is "no" -- if the reason for a spinner is just that a background tab is temporarily hanging your content process, I don't think that's the fault of or related to async-tab-switcher... though I suppose it does manifest in the tab-switch operation taking longer to get to a usable state.)
Updated•6 years ago
|
Comment 20•6 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #19)
(My guess is "no" -- if the reason for a spinner is just that a background tab is temporarily hanging your content process, I don't think that's the fault of or related to async-tab-switcher... though I suppose it does manifest in the tab-switch operation taking longer to get to a usable state.)
👍
Updated•6 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Comment 21•1 year ago
|
||
On partially reduced testcase :
Nightly: https://share.firefox.dev/4dxW82X (734ms, wrapping) / https://share.firefox.dev/3ZddHkD (720ms, no wrapping)
Chrome: Instant. The chrome profiler didnt even capture this.
Comment 22•1 year ago
•
|
||
This seems to have gotten much better last year, using testcase 2.
Fix range:
First good revision: a26e51291acad88b8964d4a96ecbcbdce6c0667b (2023-05-15)
Last bad revision: 9ca5d595c22d6b38d5802c9282ef6e54bffa464b (2023-05-14)
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9ca5d595c22d6b38d5802c9282ef6e54bffa464b&tochange=a26e51291acad88b8964d4a96ecbcbdce6c0667b
Here's a profile of reloading the partially-reduced testcase (view-source:https://bug1466704.bmoattachments.org/attachment.cgi?id=8986199
) twice with...
-
The "last bad" Nightly 2023-05-14 -- reflow bars are 2.1s long:
https://share.firefox.dev/4fZ46DV -
The "first good" Nightly 2023-05-13 -- reflow bars are 665ms long:
https://share.firefox.dev/4dx1rzn
So that was a 68% reduction in reflow time for this scenario.
Looking at the "bad" profile, I do see that a huge amount of time was spent in nsIFrame::SchedulePaint
, so this improvement probably came from bug 1832684.
Comment 23•1 year ago
•
|
||
(In reply to Mayank Bansal from comment #21)
Chrome: Instant. The chrome profiler didnt even capture this.
I see a little time spent in layout in Chrome when viewing the source of testcase 2. Here's a Chrome profile of loading that view-source 4 times:
https://share.firefox.dev/3XeM9ty
Each load has a ~21-23ms marker for "Layout".
That's substantially lower than our 600-700ms layouts, so perhaps still worth keeping this bug open to track that.
Comment 24•1 year ago
|
||
(In reply to Mayank Bansal from comment #21)
On partially reduced testcase :
Nightly: https://share.firefox.dev/4dxW82X (734ms, wrapping) / https://share.firefox.dev/3ZddHkD (720ms, no wrapping)
Chrome: Instant. The chrome profiler didnt even capture this.
Looks like the majority of time is spent running some diagnostic asserts that don't seem to be providing much value now. I filed bug 1914682 to downgrade those.
Comment 25•1 year ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #24)
(In reply to Mayank Bansal from comment #21)
On partially reduced testcase :
Nightly: https://share.firefox.dev/4dxW82X (734ms, wrapping) / https://share.firefox.dev/3ZddHkD (720ms, no wrapping)
Chrome: Instant. The chrome profiler didnt even capture this.Looks like the majority of time is spent running some diagnostic asserts that don't seem to be providing much value now. I filed bug 1914682 to downgrade those.
With latest Nightly that contains the fix from bug 1914682 :
with wrapping: https://share.firefox.dev/3T2aX5n (700ms)
Without wrapping: https://share.firefox.dev/4czlXyg (720ms)
Comment 26•1 year ago
|
||
Hmm, looks like all the time spent in those asserts just got moved to the HasAnyStateBits calls on the next line. The HasInvalidFrameInSubtree() call lower down has much less samples, but that is also just a call to HasAnyStateBits. I think what might be happening is that the time spent is in reading the contents of |this| from memory, so the first line that reads will incur that cost.
Comment 27•11 months ago
•
|
||
Profile with latest Nightly: https://share.firefox.dev/4hpVffe . This did not improve with the patches from bug 1926512,bug 1927062, bug 1927114
Description
•