[cairo] Tiny SVG performance improvement

Daniel Amelang daniel.amelang at gmail.com
Wed Jan 31 02:06:47 PST 2007


On 1/30/07, Steve Snyder <swsnyder at insightbb.com> wrote:
> Hello, all.
>
> I submitted this to Mozilla, and it was suggested that I report it here as
> well:  https://bugzilla.mozilla.org/show_bug.cgi?id=368408

Interesting parts from the report:

"...SVG performance is terrible..."

"...Profiling shows that about 40% of the execution time is spent in
Microsoft's _lldiv() routine..."

"...The problem is that 32-bit CPUs are just crushed by the repeated
64-bit fixed-point division used in _compute_x()..."

"...This patch avoids the 64-bit division in _compute_x() where possible..."

"...In the benchmark
http://www.hixie.ch/tests/adhoc/svg/perf/002-with-workarounds-for-asv3.svg
the
64-bit division is avoided about 80,000 times, or 1% (yes, one percent) of the
of the total calls to _compute_x()..."

(Me thinking: it would be nice to turn that SVG into a perf test)

"...For the Tab Preview feature of SeaMonkey _compute_x() is called
for every preview but it seems that the division can be avoided 100%
of the time..."

So, nothing from me yet; just facilitating discussion.

Dan


More information about the cairo mailing list