The default bug view has changed. See this FAQ.

Avoid calling UsingEffectsForFrame() on SVG content

RESOLVED FIXED in mozilla7

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jrmuizel, Assigned: Robert Longson)

Tracking

({perf})

Trunk
mozilla7
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

931 bytes, patch
Details | Diff | Splinter Review
(Reporter)

Description

6 years ago
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?
(Reporter)

Comment 3

6 years ago
(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.
(Assignee)

Comment 6

6 years ago
Should we just reorder the UsingEffectsForFrame() method in nsSVGIntegrationUtils so that it checks for a SVG frame first rather than last?
(Assignee)

Comment 7

6 years ago
Created attachment 541060 [details] [diff] [review]
like so?
Attachment #541060 - Flags: feedback?(bugzmuiz)
(Assignee)

Updated

6 years ago
Attachment #541060 - Flags: feedback?(bugzmuiz) → feedback?(jmuizelaar)
(Reporter)

Comment 8

6 years ago
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+
(Assignee)

Updated

6 years ago
Attachment #541060 - Flags: review?(jwatt)
(Assignee)

Updated

6 years ago
Assignee: nobody → longsonr

Updated

6 years ago
Attachment #541060 - Flags: review?(jwatt) → review+
(Assignee)

Comment 9

6 years ago
Created attachment 541157 [details] [diff] [review]
hg changeset patch
Attachment #541060 - Attachment is obsolete: true
(Assignee)

Updated

6 years ago
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
Last Resolved: 6 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.