Closed Bug 558466 Opened 15 years ago Closed 12 years ago

Organization chart in IE test drive performs poorly

Categories

(Core :: SVG, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bas.schouten, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: perf, Whiteboard: [parity-IE], ietestdrive, [in-the-wild])

The organization chart in the IE platform demo's performs significantly better in IE than in Firefox. D2D seems to have no effect on this. When zooming in/out the CPU is completely saturated.
Profile says: 18% under JS execution in the testcase. About half of this is under nsSVGTextFrame::NotifySVGChanged calling UpdateCoveredRegion. This is largely spent ensuring textruns. The other half is mostly spent in flushes (from the offsetWidth getter) processing restyles; these stacks look just like the restyle stacks described below. 11% under painting. 61% under the WillPaint presshell flush. Of this, about 1/6 (10% of testcase total) is reflow, which is largely spent under nsSVGTextFrame::UpdateGlyphPositioning, most of which is ... ensuring textruns. The other 5/6 is restyle processing, which is about 3/5 (33% of testcase total) under nsSVGTextFrame::NotifyGlyphMetrisChange calling UpdateGlyphPositioning. Again, lots of textrun time. There's also some UpdateAndInvalidate stuff going on under here. The remaining 2/5 (so 20% of the testcase) is stuff like nsSVGElement::WalkContentStyleRule updaring the content style rule, other parts of CSS restyling, nsSVGUtils::UpdateGraphic, nsSVGGlyphFrame::DidSetStyleContext, etc. In general, of the 11576 samples here 4582 are under nsSVGGlyphFrame::EnsureTextRun. About 1/4 of this is CreateFontGroup (on mac), and the rest is MakeTextRun. It looks like we at the very least ClearTextRun when DidSetStyleContext happens on nsSVGGlyphFrame. Can we avoid doing that and only clear when the style change really affects textruns?
Component: General → SVG
Keywords: perf
Product: Firefox → Core
QA Contact: general → general
Why are we hitting nsSVGGlyphFrame::DidSetStyleContext? I don't see what would be changing the style inherited by the SVG text nodes.
Whiteboard: [parity-IE] → [parity-IE], ietestdrive
> I don't see what would be changing the style inherited by the SVG text nodes. Style changes on any container would trigger DidSetStyleContext on the SVG glyph frames... In this case, we're ending up with style changes on the <div id="svgwrap">.
In Nightly, I have no CPU problem while zooming in and out.
Depends on: 854765
I think we can call the original issue fixed, unless anyone disagrees. I get smooth animation when using the slider at the top-right to zoom in and out rapidly. That said we are still invalidating the entire SVG on every change in zoom level. I've opened bug 876189 where we can think about solutions to that (see that bug for an analysis of what's going on). If anyone is still seeing a perf issue, then that's the bug we'll need to fix.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
Whiteboard: [parity-IE], ietestdrive → [parity-IE], ietestdrive, [in-the-wild]
You need to log in before you can comment on or make changes to this bug.