Quoting Jakub Steiner <jimmac@...446...>:
What are the drawbacks of going the other approach - doing vacuum defs automatically and only store gradients that are actually used.
Since SVG allows external references, we don't have enough information to know whether it really is safe to delete arbitrary gradients etc. we may find in the document.
You run the risk of chewing up files that are e.g. intended to be used as "libraries" containing resources (gradients, whatever) that are included from other SVG files. Even though Inkscape doesn't directly support this yet, I do this a fair amount for use with other SVG renderers.
I should note that we do perform automatic cleanup on many types of objects that Inkscape creates without user intervention (since we can guarantee they're only used locally). Perhaps we can tune the automatic vacuuming policy a little more, but I think it's already nearly as agressive as it can safely be.
-mental