trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: December 2013

Re: [trinity-devel] Need an svg expert

From: "E. Liddell" <ejlddll@...>
Date: Sun, 15 Dec 2013 13:00:33 -0500
> All,
> 
> In bug report 1591, we noticed Trinity struggles to open the svg 
> files packaged with LibreOffice. Originally this was noticed when 
> trying to open the Office submenu, but general perusing of the svg 
> files reveals a slowdown.
> 
> As the svg files are XML (text) files, would one of you graphics 
> wizards look at the LO svg files for possible reasons why Trinity 
> struggles with the files?
> 
> Even on a dual core system the files need a few seconds to open 
> whereas other svg files open immediately.
> 
> The LO svg files get installed to 
> /usr/share/icons/hicolor/scalable/apps.  

The problem is just that they're very large and complex files, from
the looks of it.  Lots of shapes, lots of gradients, lots of (unnecessary,
IMNSHO) clipping and masking.  The SVG icon files that ship with
Trinity are mostly ten percent or less of that size, and much less
complex.  Even in Inkscape on my quad-core, the LO files take 
several seconds longer to load than, say, the old 
crsc-app-openoffice.svgz icon that ships with our Crystal theme.

The optimum solution would be to clonk whoever created the files
over the head with a blunt object and get them to redo them as
straightforward stacks of shapes and gradients without all the
unnecessary file-bloating crap.  The code to look at in TDE is
the stuff related to clipping, masking, and cloning in SVGs, but it 
may never be possible to make these files open acceptably fast on 
a slow machine.  They're just not made with that in mind.

The only workaround that occurs to me at this time is overwriting
the files with something simpler after LO is installed, or else
deleting the SVGs outright and (hopefully) forcing the system to
fall back on the raster versions of the icons.

I can attempt to redraw the icons to produce substantially identical
smaller SVGs to overwrite them with, but it would take a while,
so I'm not going to start until and unless we decide that this is the
way to go.

E. Liddell