« SVG Performance | Main | textPath for Firefox 2 »

March 7, 2006

Filter performance

While one might wonder what pixel level effects are doing in a vector graphics format, SVG has a number of different filter effects. Mozilla SVG currently implements a subset of filters () for the trunk.

In the spirit of informal benchmarking, here are the results of some simple tests. Again, all numbers from the same machine, time in seconds. test1 is a test of probably the simplest filter effect, a color mapping. test2 is a test of doing a RGBA Gaussian blur with a fairly wide footprint. test3 implements a drop shadow with an alpha Gaussian blur (which we don't shortcut, but do full RGBA blur), an offset, then a merge effect.

Firefox trunk Adobe SVG 3.03 Opera 9.00.8246
test1 (feComponentTransfer) 38.4 8.6 81.8
test2 (feGaussianBlur) 282.9 44.2 188.6
test3 (feGaussianBlur + feOffset + feMerge) 425.3 40.8 155.2

These numbers aren't suprising, given that the filter pixel operations were written in a straightforward manner, and there hasn't been any effort spent yet in tuning and optimizing that code.

Posted by tor at March 7, 2006 11:26 PM