Closed Bug 666068 Opened 13 years ago Closed 13 years ago

Avoid calling UsingEffectsForFrame() on SVG content

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla7

People

(Reporter: jrmuizel, Assigned: longsonr)

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

On the SVG rotating tiger we spend about 0.9% of the time in UsingEffectsForFrame() which always returns false for svg content. We could avoid calling this by hanging a flag on the frame that would mark whether we are an SVG frame or not.
I'm actually pretty surprised that we don't have this flag already.  It may also be useful in other pieces of our generic layout code where we do SVG specific hacks.
Where are we calling it from?  Invalidation, or something else?
(In reply to comment #2)
> Where are we calling it from?  Invalidation, or something else?

Invalidation.
So bug 614732 might get us that "for free".
Sounds like it's just a case of adding an |frame->IsFrameOfType(nsIFrame::eSVG)| check. Either that or wait to see if bug 614732 or its followups fix this as bz says.
Should we just reorder the UsingEffectsForFrame() method in nsSVGIntegrationUtils so that it checks for a SVG frame first rather than last?
Attached patch like so? (obsolete) — Splinter Review
Attachment #541060 - Flags: feedback?(bugzmuiz)
Attachment #541060 - Flags: feedback?(bugzmuiz) → feedback?(jmuizelaar)
Comment on attachment 541060 [details] [diff] [review]
like so?

IsFrameOfType is still going to be a virtual call, but this patch seems like pure win.
Attachment #541060 - Flags: feedback?(jmuizelaar) → feedback+
Attachment #541060 - Flags: review?(jwatt)
Assignee: nobody → longsonr
Attachment #541060 - Flags: review?(jwatt) → review+
Attachment #541060 - Attachment is obsolete: true
Flags: in-testsuite-
Keywords: checkin-needed, perf
Landed on inbound.
Keywords: checkin-needed
Pushed:
http://hg.mozilla.org/mozilla-central/rev/7bb02cc447e0
Status: NEW → RESOLVED
Closed: 13 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: