Closed Bug 154910 Opened 22 years ago Closed 8 years ago

arena allocate PerFrameData and PerSpanData

Categories

(Core :: Layout: Block and Inline, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 250105
Future

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

I decided to try arena-allocating PerFrameData and PerSpanData (in nsLineLayout)
using the pres shell's dynamic stack arena.  I haven't yet found a testcase
where this gives a measurable performance improvement, but I suspect it helps a
little bit.

This patch also removes the free list -- I put in some printfs, and on the first
10 or so pages of jrgm's tests, we used the free list for about 10 of 100000 or
so allocations of these structures.  It seems that the usual case is just
creating them and then destroying them (as I suspected).
Attached patch patch (obsolete) — Splinter Review
Here's the patch I've been testing.

It might also be worth changing things like
nsBlockFrame::DoReflowInlineFramesMalloc to use the same arena.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.1beta
Target Milestone: mozilla1.1beta → mozilla1.2alpha
Comment on attachment 89634 [details] [diff] [review]
slightly cleaner patch

r=/sr=waterson.
Attachment #89634 - Flags: superreview+
Comment on attachment 89634 [details] [diff] [review]
slightly cleaner patch

>+    // The normal operator new is disallowed.
>+#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
>+    void* operator new(size_t sz) throw () { return nsnull; }
>+#else
>+    void* operator new(size_t sz) { return nsnull; }
>+#endif

use CPP_THROW_NEW (here and for the real operator new()).

Same for PerSpanData

Could we remove the NS_LINELAYOUT_NUM_FRAMES and NS_LINELAYOUT_NUM_SPANS
defines too?

With that, r=bzbarsky
Attachment #89634 - Flags: review+
Fix checked into trunk, 2002-08-06 06:51 PDT.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Reopening.  This fix was incorrect.  See bug 162516.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla1.2alpha → ---
Status: REOPENED → ASSIGNED
Keywords: perf
Target Milestone: --- → Future
Component: Layout → Layout: Block & Inline
QA Contact: chrispetersen → layout.block-and-inline
Bug last commented in 2002, last touched in 2009, is this still valid
Flags: needinfo?(dbaron)
Status: ASSIGNED → RESOLVED
Closed: 22 years ago8 years ago
Flags: needinfo?(dbaron)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: