I've been working on SVG filters, trying to get the World Of Ecmascript SVG version to not suck when you load it in Firefox 3. There are some interesting lessons in how not to write a spec for the Web.
Basically, the SVG Working Group tried to "help" implementors by having the filter markup describe the bounds of the region that the filter will operate on (the filter effects region and the filter primitive subregions). This puts a burden on authors and their tools, but it should help us browser developers, right? Unfortunately no. What has happened is that some tools generate bad markup; in particular Omnigraffle has produced markup that basically says the shadow of every object in W.O.E. is the size of the viewport! Our naive filter implementation follows that "advice" and applies filter effects to enormous filter buffers, which is of course incredibly slow and wasteful.
Dealing with bad markup is what browsers do, and in this case it's not hard in principle. We just have to ignore the markup hints and compute reasonable bounding boxes for the temporary surfaces required by each filter effect. I have a patch that does just that, and it turns W.O.E. from "hangs the browser" to "almost snappy". The problem is that the filter attributes specifying the filter effects region are now an unnecessary burden on authors. In fact, it's worse than that; the spec says that the renderer must clip rendering to the filter effects region and the filter primitive subregions, so we have to go ahead and compute them from the markup (not trivial) just so we can clip filter effects as per spec ... clipping the author probably doesn't want anyway.
This is a classic case where well-intentioned spec authors have made life unnecessarily difficult for everyone. Specifying "hints for the implementation" can be useful --- e.g. CSS 'text-rendering' which we support in FF3 --- but you have to be sure that if the author (or her tools) gives the wrong hint, the results are not disastrous. You also have to be sure that implementations are allowed to completely ignore the hints if taking advantage of the hints would be more trouble than it's worth.
I should mention that although this is an example of where the SVG spec kinda sucks, it's also an example of the utility of SVG that we've able to render vector graphics exported by applications like Omnigraffle.