Open Bug 77948 Opened 23 years ago Updated 2 years ago

Improve ReflowInput's constructor

Categories

(Core :: Layout, defect, P5)

defect

Tracking

()

REOPENED
Future

People

(Reporter: waterson, Unassigned)

References

Details

(Keywords: embed, perf, Whiteboard: [layout:backlog:quality])

nsHTMLReflowState's ctor is fairly expensive considering how often it's called;
we should examine it to determine if there are ways it can be improved. For
example, could we compute some of the information lazily? (I know of at least
one case where the state is constructed, but only one field is actually used.)

Anyway, this shows up on profiles of long pages. Filing a bug so the task can be
tracked.
Blocks: 56854
Status: NEW → ASSIGNED
Keywords: perf
Priority: -- → P4
Target Milestone: --- → mozilla0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Target Milestone: mozilla0.9.2 → mozilla1.0
Target Milestone: mozilla1.0 → mozilla0.9.6
I can take this one.
Assignee: waterson → bryner
Status: ASSIGNED → NEW
not going to make 0.9.6, will investigate for 0.9.7.
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.7
will finish investigating this for 0.9.8.
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Back over to you, waterson... I'm not going to have time to get to this.  Maybe
we can pass it around to someone else if it turns out to be important.
Assignee: bryner → waterson
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.8 → Future
Comments from bug 116437, which is about a 24MB file taking forever to layout.
The jprof is at http://bugzilla.mozilla.org/showattachment.cgi?attach_id=65191
Shows 3% in nsReflowState::nsReflowState()

Typical: 
  Mostly Reflowing lines:

12% direct (90% total) in ReflowDirtyLines()
4% total in nsFontCache::GetMetricsFor()
6% direct in nsBlockReflowState::RecoverStateFrom()
2% direct in nsBlockFrame::PropagateFloaterDamage()
3% total in nsFrame::Invalidate()
10% direct in nsLineBox::GetCombinedArea()
4% direct, 13% total in nsBlockFrame::ComputeFinalSize()
6% direct in nsBlockFrame::BuildFloaterList()
8% total in nsBlockFrame::PlaceLine()
1.5% total in nsCSSRendering::FindBackground
3% total in nsHTMLReflowState::nsHTMLReflowState
5% direct in nsFrameList::LastChild
10% total in nsRenderingContextGTK::GetTextDimensions()
batch: adding topembed per Gecko2 document
http://rocknroll.mcom.com/users/marek/publish/Gecko/Gecko2Tasks.html
Keywords: topembed
Blocks: 21762
--> for reassignment. 

Changing from topembed, to embed, as this is not currently blocking a major
embedding customer.
Assignee: waterson → kmcclusk
Status: ASSIGNED → NEW
Keywords: topembedembed
Whiteboard: [adt3] [ETA Needed]
Blocks: grouper
Bulk adding topembed keyword.  Gecko/embedding needed.
Keywords: topembed
Keywords: topembedmeta
Keywords: nsbeta1
OS: Windows 2000 → All
Hardware: PC → All
nsbeta1-
Keywords: nsbeta1nsbeta1-
Assignee: kmcclusk → nobody
QA Contact: chrispetersen → layout
Time to close it.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
I think this is still an issue.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: improve nsHTMLReflowState's ctor → [meta] improve nsHTMLReflowState's ctor

The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:svoisen, maybe it's time to close this bug?

Flags: needinfo?(svoisen)

Removing meta to get off mgmt bot's list.

Flags: needinfo?(svoisen)
Keywords: meta
Priority: P4 → P5
Summary: [meta] improve nsHTMLReflowState's ctor → improve nsHTMLReflowState's ctor
Whiteboard: [adt3] [ETA Needed] → [layout:backlog:code-quality]

Change the bug title because nsHTMLReflowState has been renamed to ReflowInput in bug 1277129.

One example jumps into my mind, which might worth improving, is
https://searchfox.org/mozilla-central/rev/9e45d74b956be046e5021a746b0c8912f1c27318/layout/generic/nsBlockFrame.cpp#3528-3536

Summary: improve nsHTMLReflowState's ctor → Improve ReflowInput's constructor
Whiteboard: [layout:backlog:code-quality] → layout:backlog:quality
Whiteboard: layout:backlog:quality → [layout:backlog:quality]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.