Closed Bug 92573 Opened 23 years ago Closed 23 years ago

nsVoidArray -> nsAutoVoidArray changes for Layout

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: jesup, Assigned: jesup)

References

Details

(Keywords: perf)

Attachments

(2 files)

Taken from bug 90545.  I _really_ want to see these committed ASAP.  The patch
will require that the phase 1 patch from that bug be applied/committed first.
I'm taking this bug (it's a split off from my bug 90545).
Assignee: karnaze → rjesup
Depends on: 90545
Keywords: patch, perf
Blocks: 92256
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.5
Review Comments: 

In nsCellMap.cpp, the method OrderRowGroups should be changed to take and
nsAutoVoidArray reference, and the following cast should be eliminated:
 -  aTableFrame.OrderRowGroups(orderedRowGroups, numRowGroups);
 +  aTableFrame.OrderRowGroups((nsVoidArray &)orderedRowGroups, numRowGroups);
It seems bad to cast the nsVoidArray to an nsAutoVoidArray like that.

Other than that, the change looks good to me, but <paranoias> since table code
is so heavily involved, it might be good to run the table regression tests
</paranoias> [s]r=attinasi
Given a review from attinasi, I'll try to get this for 0.9.4.  Risk is low.
Target Milestone: mozilla0.9.5 → mozilla0.9.4
Randell, what about my comments?
Sorry, I was going to post an updated patch, but I was waiting for it to compile
and test it first.

I simply removed the cast; it was a leftover and was irrelevant.  C++ does the
type-conversion automatically.
Ran every testcase I could find; no errors that weren't present before the patch
(I ran two side-by-side, one with one without).
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Attachment #47286 - Flags: superreview+
Attachment #47286 - Flags: review+
Kin asked about possible bloat due to nsHTMLReflowCommands getting bigger.  Here
are the stats I gathered:

nsHTMLReflowCommand->mPath stats:
	Number created:    368
	Number in-use max:  10
	Num max size == 0:   0
	Num max size <= 8: 298
	Num max size  > 8:  70

So the worst possible bloat is 32*10 = 320 bytes, but since ~80% of them use no
more than 8 items, and none use 0, the likely bloat is more like 64 bytes.
(This was loading and resizing each of mozilla.org, cnn.com, yahoo.com and
espn.com.)

I'm comitting this patch now.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 80210 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: