On Jan 22, 2006, at 9:00 AM, Eric Wilhelm wrote:
# from jiho # on Sunday 22 January 2006 06:50 am:
Does embedding have any performance penalties?
I thought I read here that embedding images directly in SVG is very bad for performance. but maybe you were thinking of a new file format then.
The byte size increase is typically a 4:3 ratio, so there is the added reading (less the overhead of opening another file and reading that) plus the decoding. In most cases, this is going to be fast enough that it doesn't make a lot of difference (and if it saves head-scratching, then it is a net win.)
Actually, there's a lot more to it than just that raw size.
When an image is linked, the in-memory graphic is handled by GTK, and the size is the image size *plus* the length of the string of the filename. If it is embedded, then you get the size of the image handled inside of GTK *plus* the size of the image encoded in base64 handled in Inkscape proper.
linked: image + 10-100 bytes embedded: image * 2.33 + 22 bytes
Then there's the size in memory that's needed for the full string node in the DOM tree, plus all the UI impact from having large strings kicking around, including the XML Editor window.