Comment 3 for bug 1376836

Revision history for this message
su_v (suv-lp) wrote :

(Note: It's unclear what 'The "Arrows" file' mentioned in the earlier comment relates to (it was not provided) - below answer is based on the actual contents of the file "How to images.svg" without access to the original AI file from which the clip art was imported into the Inkscape document.)

Quick answer:
Use 'File > Vacuum Defs' from time to time to remove unreferenced resources (clip-paths, masks, etc.) from the current document.

Background:
The objects imported from the AI file are actually masked bitmap images inside nested clipped groups. The masks themselves are bitmap images too (which are used for the alpha channel of the bitmap images).

If such a clipped (or masked) group is ungrouped or deleted, or a masked (or clipped) bitmap image itself is deleted, the clip-paths and masks are retained in the <defs> section. Clip-paths and masks are only removed from the <defs> section if the clip or mask is released via corresponding menu command (see menu 'Object'). The command 'File > Vacuum Defs' can be used to cleanup such remains in the current document.

The file size of the attached example shrinks from 3.6 MB to 306 KB after having vacuumed the defs and saved again.

Proposing to link as duplicate to
- Bug #443229 “Embedded alpha channels (masks) aren't removed from file when the images are deleted”
  <https://bugs.launchpad.net/inkscape/+bug/443229>