Last modified: 2014-09-17 21:29:31 UTC
SVG files embedded into CSS should be passed through svgo [1] or some similar SVG minification software first, to reduce size. (Ideally the same should happen for non-embedded files, but that seems more complicated.) Per [2], size reduction can be as much as 90%. [1] https://github.com/svg/svgo [2] https://gerrit.wikimedia.org/r/#/c/103894/
SVGO is too buggy to use transparently in its current version (see the long history of the patch you linked and https://gerrit.wikimedia.org/r/#/c/106506/ ). Related: bug 59744.
What about using SVGO plus a post-processing script to fix the bugs? Right now, a lot of teams are minifying their SVGs locally, which not only makes them harder to edit later, but breaks the SVGs in many cases.
I don't think it's possible to write a script to recover information incorrectly deleted by svgo, we should rather fix its bugs.
*** This bug has been marked as a duplicate of bug 34812 ***