Inkscape.org
Beginners' Questions Ballooning file sizes and a sort of solution
  1. #1
    Hogweard Hogweard @Hogweard

    I turned my hand to church heraldry and created a series of images, all derivative of each other, to go on WikiCommons. The first ones were 10-20 KB or thereabout, but suddenly they were up to 2, 3 or 4 MB with no great increase in complexity. I started taking the images apart, and each grouped element was only a few dozen KB, so I moved each element, reassembled them as a new file, and suddenly a 5 MB file was just 220 KB. I then took another, 2.7 MB file, I deleted each element from the old file and the blank image was still 2.5 MB!  I looked at the code behind it (which I have not even tried to read) and was enormous.  It is as if the file code was remembering all past edits.

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Describe your OS & version, the version of Inkscape and the installer you used.

    Bonus points, if you:

    • Attach an example SVG file that has the issue.
  3. #3
    Hogweard Hogweard @Hogweard

    I am using Windows 10 I have Inkscape 0.92.  I have attached a file that went to 4.89 MB: when I copied all the elements and pasted them into a new file, the resultant file was 226 KB. Also attached is a 2.4 MB blank image!

    I did the copying and pasting on another computer, possibly with an earlier version of Inkscape, but I noticed the same 'ballooning' effect on that one too.

    Because the images are a long series, I open an image I did earlier (which itself would be based on an earlier one), delete the objects I will not need, change the colours, then start putting new objects in, making improvements etc. The code might be an accumulated left-over from the parent files, as if when I delete an object it leaves part of the code behind.

    Blank
    Olddiocese Of Trinidad And Tobago Arms
  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    The svg file has many unused gradient definitions. It is a simple matter of using Menu: File>Clean Document.

  5. #5
    Hogweard Hogweard @Hogweard

    That is brilliant - thank you.  I had not tried the "Clean document" function before, but it works a treat.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Ballooning file sizes and a sort of solution