
On Mon, 3 Jan 2005, bulia byak wrote:
I'm also against using librsvg in any manner or form. We must use our own renderer, if only because it............ helps discover Inkscape bugs (it's like running a test suite on each loading of the program).
I've seen this argument utilized several times since the incorporation of the SVG renderer for the icons. Early on, I think the argument made sense, however today I think it is out dated, for the following reasons:
a) Regression tests do not need to be run over and over on the same released codebase. If rendering icons has any value, then it can be achieved via ONE run, plus a thorough inspection. It makes no sense to impose running a test suite on every user every time they run it, when it is guaranteed to always give the exact same result.
b) We now have sufficient organization and infrastructure to put together much better regression tests than would be obtained via rendering of toolbars. (And we ought to do so.)
You yourself made a point in this thread regarding breaking up icons.svg into multiple files, expressing the concern that loading from multiple files would make startup time slower than loading from a single file.
Clearly, if it is a goal to minimize startup time, then this strongly suggests stopping the svg render on initialization. The SVG rendering completely overshadows the performance loss from loading from multiple icon files.
Probably the fastest would be to pre-render all of the icons into a single runtime-encoded bitmap, enabling the entire data set to be loaded into memory in one operation. Games do this all the time with their icons, so the technology is very well understood.
But even if this is not done, at least eliminate the svg rendering during loadup. It's benefit as a regression test is negligible, but its performance impact is quite significant. Instead, use the renderer but cache the results; this gives us the best of all worlds, for the cost of a little coding effort.
Bryce