[FIX]Consider optimizing nsLayoutUtils::GetFloatFromPlaceholder a bit

RESOLVED FIXED in mozilla1.9.3a1

Status

()

Core
Layout
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla1.9.3a1
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

This does two somewhat-expensive operations:

1)  A virtual GetType() call.  Most consumers do it too, so we do it twice.  I
    think we should just assert the type and fix the one consumer that currently
    doesn't do the type check.
2)  Getting style data.  We can use state bits on the placeholder to keep track
    of what kind of out-of-flow it's a placeholder for; this is a frame-lifetime
    invariant.

This only shows up as a problem on things like the bug 424715 testcase, and is only about 3-4% of that testcase, so maybe not worrying about?
Yeah but it's simple and easy so why not? Maybe Mats can do it.
Created attachment 412601 [details] [diff] [review]
Part 1: nix type check
Attachment #412601 - Flags: review?(roc)
Created attachment 412602 [details] [diff] [review]
Part 2: use a bit for the placeholder type
Attachment #412602 - Flags: review?(roc)
Assignee: nobody → bzbarsky
Summary: Consider optimizing nsLayoutUtils::GetFloatFromPlaceholder a bit → [FIX]Consider optimizing nsLayoutUtils::GetFloatFromPlaceholder a bit
Pushed:
http://hg.mozilla.org/mozilla-central/rev/564f5cc14da1
http://hg.mozilla.org/mozilla-central/rev/168606de059d
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.