Closed Bug 332413 Opened 18 years ago Closed 14 years ago

A very slow SVG file with <path>s

Categories

(Core :: SVG, defect, P2)

x86
All
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ian, Unassigned)

References

()

Details

(Keywords: perf, Whiteboard: [in-the-wild] [external-report])

Attachments

(2 files)

TESTCASE
   http://www.hixie.ch/tests/adhoc/svg/perf/007.xml
   Based on the map from: http://www.wherearewe.co.nz/svg.html

DESCRIPTION
   It's a 400k SVG file with 163 paths, some of which are relatively
   complicated, having several kilobytes' worth of path description.
   It takes an inordinate amount of time to render.
Safari is _smoking_ on this test, fwiw.
Attached file profile
Profile of this testcase. Most of the time is spent in cairo. 
_cairo_traps_tessellate_polygon sticks out on the profile.
*** Bug 333617 has been marked as a duplicate of this bug. ***
Is this bug supposed to be marked Linux? Seems like a Mac (or all?) bug based on Safari comments.
This svg has a lot of textPaths.  Zooming and panning is very slow.  Even just moving the cursor over the image consumes a lot of cpu.
I've added an additional example (slowZoomAndPan.svg) that comprises of a lot of text on text paths.  It also implements zooming and panning using code derived from the example at http://jwatt.org/svg/tests/zoom-and-pan-controls.svg.

Zooming and panning of this svg is very slow (compared to a similar svg that has lines drawn along the paths, but no text) and is much slower than the time taken to originally load the document.

Also, just moving the cursor around over the document seems to consume an unexpected amount of cpu.
I've just added a test case to cairo's performance test suite derived from this SVG file. It's the "world_map" test case so if you've got a recent checkout of cairo via git then you can measure the speed (or the slowness, rather) of this case with:

    ./cairo-perf world_map

This is a very nice test case which will be helpful in guiding performance imrprovements we make in cairo going forward. Thank you very much for providing it. (And thanks to Gary Nicholson from imapping.co.nz who gave permission to use the data).

-Carl
With the world map testcase at http://www.hixie.ch/tests/adhoc/svg/perf/007.xml

I'm getting times of approximately 16s using:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010
Firefox/2.0

and approximately 2s on:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a1) Gecko/20061204
GranParadiso/3.0a1

However, on Fx 2, I can actually see the map resizing. On GranParadiso, it appears large throughout and doesn't seem to update anything but the text. Additionally, GranParadiso appears to leave some text artifacts on screen (the tail of the "g").
Another probable testcase:

http://upload.wikimedia.org/wikipedia/commons/c/ca/Video_Standards.svg

On my Core2Duo 2.4GHz it takes ~3 seconds to render, but scrolling is only possible through Page Down/Page Up, smooth scrolling is impossible.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7pre) Gecko/2007072804 Minefield/3.0a7pre
Flags: blocking1.9?
OS: Linux → All
I'd like to see if we can do something with this in 1.9 timeframe.  If the fix is too difficult let's take it off the list.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
The testcase in comment 9 is slow because of filters/drop shadows, not because of an inordinate amount of paths. Removing the filters its quite usable on a Core2Duo machine.
(In reply to comment #12)
> The testcase in comment 9 is slow because of filters/drop shadows, not because
> of an inordinate amount of paths. Removing the filters its quite usable on a
> Core2Duo machine.
> 

bug 414784 should help the filter issue.
I've filed bug 420953 for the filters testcase Video_Standards.svg.
The performance of Hixie's testcase is not bad enough to block the release of Firefox 3, so downgrading the blocking1.9+ to wanted1.9+.
Flags: wanted1.9+
Flags: tracking1.9+
Flags: blocking1.9-
Assignee: general → nobody
QA Contact: ian → general
cairo path performance has improved as has SVG text performance http://muizelaar.blogspot.com/2010/01/graphics-performance-in-firefox-36.html

This seems similar in performance to Opera now. It does have a bug in the scroll handler that means that the zoom control does not stay unscaled but that is not the focus of the bug and neither is it a bug in Firefox.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Whiteboard: [in-the-wild] [external-report]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: