Big file size difference - same process
Big file size difference - same process
Hi all
This may be a strange one; I tried a quick search but saw nothing close.
I had some .dwg files I needed to use in a flyer. I loaded them into DoubleCAD and exported them as svg's. That produced files of 5 - 6 Mb. Loaded them into Inkscape (one at a time) and (after numerous crashes) trimmed out what I didn't want, resized them and saved them as plain svg. Two of them went from about 5mb to 35 and 45 kb. The rest of them went to about 600 - 700 kb! I followed the exact same procedures for each file - load, modify, save - and end up with some files that are 25 times bigger than the others. Is this normal? Did I do something obviously wrong that I am missing? is it a bug?
BTW it's .47 running on WinXP.
Thanks
This may be a strange one; I tried a quick search but saw nothing close.
I had some .dwg files I needed to use in a flyer. I loaded them into DoubleCAD and exported them as svg's. That produced files of 5 - 6 Mb. Loaded them into Inkscape (one at a time) and (after numerous crashes) trimmed out what I didn't want, resized them and saved them as plain svg. Two of them went from about 5mb to 35 and 45 kb. The rest of them went to about 600 - 700 kb! I followed the exact same procedures for each file - load, modify, save - and end up with some files that are 25 times bigger than the others. Is this normal? Did I do something obviously wrong that I am missing? is it a bug?
BTW it's .47 running on WinXP.
Thanks
Re: Big file size difference - same process

Welcome to InkscapeForum!
I guess it depends on what's in the images. Many things, such as gradients and filters (including blur) can swell the file size. Can you show us an example of a small one and a large one? Screenshots, at least. But if you could share the SVG files, we could download, open, and investigate.
Oh, well you might try File menu > Vacuum defs first. This will delete any unneeded data. If that doesn't help, could you show us examples?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Big file size difference - same process
Watch out with how many nodes arcs are exported by your CAD software to SVG (probably arcs and circles get flattened i.e. converted to a series of short straight lines instead of using an SVG path command for arcs).
Re: Big file size difference - same process
I recommend to upgrade to the latest stable release (0.48.2)!philn wrote:BTW it's .47 running on WinXP.
Re: Big file size difference - same process
Thanks for the Welcome! And the responses. I tried the vacuum defs but that seemed ineffective. I will see if I can get an ftp going on the server and upload them to there. I will also install newer version. The curious thing is that I could swear I did the exact same steps for all of them and they are all basically the same thing - just variations.
I'll be back.
I'll be back.
Re: Big file size difference - same process
Images are at:
[url]rw2.co/svg[/url]
[url]rw2.co/svg[/url]
Re: Big file size difference - same process
I tried vacuum defs but it didn't seem to make a difference.
I upgraded to .48 but that didn't seem to make a difference.
Here are the images (not the original dwg's which I could add if needed); [url]rw2.co/svg[/url]
TIA
I upgraded to .48 but that didn't seem to make a difference.
Here are the images (not the original dwg's which I could add if needed); [url]rw2.co/svg[/url]
TIA
Re: Big file size difference - same process
Maybe my crisis is over. I had been un-grouping the svg file so that I could delete what I didn't want and then re-grouping again and that produced the huge files. This time I tried 'combining' (after reading some of the tutorial along the way) and after about 10 minutes of hogging my computer it produced a file that looks identical visually but is 1/10 the size.
So, thanks for the ideas and hopefully this will help someone else looking to get smaller files.
So, thanks for the ideas and hopefully this will help someone else looking to get smaller files.
Re: Big file size difference - same process
Well that's interesting!
So in the files that originally were coming out smaller (after the process), in those files, you did not have to ungroup?
I've just visited the site with the SVGs, but don't know which ones are the small and which are the large. I'll still be glad to have a look, if you want. Just tell me(us) which 2 to look at (one large, one small)
So in the files that originally were coming out smaller (after the process), in those files, you did not have to ungroup?
I've just visited the site with the SVGs, but don't know which ones are the small and which are the large. I'll still be glad to have a look, if you want. Just tell me(us) which 2 to look at (one large, one small)

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Big file size difference - same process
Thanks for looking. Here's the dir structure from my hard drive (they're the same files but I've added a couple).
The top two - base plate and corner block - were done a long time ago and I don't recall how I did them. Maybe I knew what I was doing back then.
The files with '07 in them are the original exports from the cad program (maybe DoubleCAD). "End Block Left_base_combined" I did as mentioned but don't recall the exact sequence. I pretty sure it went like this: started with "End Block Left_nov25-07.svg", deleted what I could right away, ungrouped and deleted the rest of what I didn't want, somewhere in here selected all that remained and adjusted drawing size to match and scaled to 1250 x <whatever>, then with all selected ran 'combine' command. Waited about 10 minutes (really - 2.2G Dell Celeron, 2G ram) and finally got a 60 kb file.
I'm going to try it again and see what happens.
Code: Select all
Directory of E:\Images\Technical
10/05/2011 07:04 AM <DIR> .
10/05/2011 07:04 AM <DIR> ..
09/30/2011 01:20 PM 43,393 BasePlate.svg
09/30/2011 04:10 PM 46,645 BasePlate_mod01.svg
09/30/2011 03:04 PM 35,510 Corner Block.svg
09/30/2011 04:12 PM 35,501 Corner Block_mod01.svg
09/29/2011 04:22 PM 5,838,629 Corner Block_nov25-07.svg
10/05/2011 07:04 AM 0 dir.txt
10/01/2011 10:24 AM 937,629 End Block Left.svg
10/04/2011 01:58 PM 678,292 End Block Left_base.svg
10/04/2011 02:15 PM 59,439 End Block Left_base_combined.svg
09/29/2011 04:23 PM 6,162,880 End Block Left_nov25-07.svg
10/03/2011 06:56 AM 661,207 Half Block.svg
10/04/2011 04:23 PM 434,724 Half Block_no-stroke.svg
09/29/2011 04:25 PM 6,090,627 Half Block_nov25-07.svg
09/30/2011 03:44 PM 1,341,530 Retaining Block.svg
09/30/2011 04:03 PM 1,139,522 Retaining Block_mod01.svg
09/29/2011 04:25 PM 454,368 Retaining Block_nov25-07.svg
The top two - base plate and corner block - were done a long time ago and I don't recall how I did them. Maybe I knew what I was doing back then.

The files with '07 in them are the original exports from the cad program (maybe DoubleCAD). "End Block Left_base_combined" I did as mentioned but don't recall the exact sequence. I pretty sure it went like this: started with "End Block Left_nov25-07.svg", deleted what I could right away, ungrouped and deleted the rest of what I didn't want, somewhere in here selected all that remained and adjusted drawing size to match and scaled to 1250 x <whatever>, then with all selected ran 'combine' command. Waited about 10 minutes (really - 2.2G Dell Celeron, 2G ram) and finally got a 60 kb file.
I'm going to try it again and see what happens.
Re: Big file size difference - same process
The images are composed of 'normal' drafting views. I tried using 'simplify' on each view separately. The 'top view' of the retaining block was about 350 paths and ran through in a few seconds - the isometric view was about 5,600 paths and was taking a very long time. It also hogged all my computer resources while it was trying, to the point that I had to use 'Task Manager' to force it to close because the mouse wasn't responding. Maybe if there had been a 'priority' setting I could have minimized the window and let it churn away. I meant to let it run when I left work but got tied up and forgot. I will keep experimenting.
Re: Big file size difference - same process
As I mentioned earlier: it's the arcs (in the isometric view, as well as where those parts are visible in the normal drafting views) which have not been exported as SVG arcs or bezier curves with a few nodes/handles - they have been exported as hundreds of tiny (straight) path segments (flattened arc/circle).philn wrote:the isometric view was about 5,600 paths and was taking a very long time.
Each of these tiny paths (polylines) does have its own style definition and transform attribute, which contributes to the file size difference. Once you have combined them into a single path, only one style definition and transform attribute is needed, thus saving a lot of duplicate information stored in the SVG source before.
You can reduce the file size even further by joining coinciding nodes in the node tool, but you can't 'automatically' convert those flattened arcs into bezier curves with two or three nodes only (which of course would really reduce the file size): The new node tool in Inkscape 0.48 does allow to join nodes which are close or precisely coniciding, and also allows to remove nodes/segments between selected nodes: Release Notes 0.48: Improved node join / Improved segment join
Re: Big file size difference - same process
Thanks for that. I think, before I go any further, I'll try replacing the ellipses, as they exist, with new ones drawn with the ellipse tool.
Also, one thing I haven't figured out yet is 'path visibility'. I have some limited experience using paths in PhotoShop where, IIRC, they are automatically placed on a separate layer and are always usable/visible when you want them. With these drawings in Inkscape if I stroke a path, or create an object with one of the drawing tools then try to remove the stroke, the path disappears. Is that normal or am I doing something wrong?
Also, one thing I haven't figured out yet is 'path visibility'. I have some limited experience using paths in PhotoShop where, IIRC, they are automatically placed on a separate layer and are always usable/visible when you want them. With these drawings in Inkscape if I stroke a path, or create an object with one of the drawing tools then try to remove the stroke, the path disappears. Is that normal or am I doing something wrong?
Re: Big file size difference - same process
With these drawings in Inkscape if I stroke a path, or create an object with one of the drawing tools then try to remove the stroke, the path disappears. Is that normal or am I doing something wrong?
Yes, that's normal for Inkscape. Why is it that you need path without stroke?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Big file size difference - same process
I make mistakes. And I found it convenient working with the raw paths and nodes to transform my drawings and then stroking them to see how they looked. If I didn't like it I would just turn off the stroke and carry on messing around with the paths and nodes. Like the pen tool and bezier curves. Or manual tracing. I'm no expert.
Anyway it looks like the arcs were the problem with my drawings. I changed one drawing to replace the arcs with 'real' ellipses and the file size went from 600k to 56k. And actions like combine and break apart take about 3 seconds. Funny thing though - the drawing 'Retaining Block_mod01.svg' has 6 distinct views and when I select all and combine, three of them disappear.
Anyway it looks like the arcs were the problem with my drawings. I changed one drawing to replace the arcs with 'real' ellipses and the file size went from 600k to 56k. And actions like combine and break apart take about 3 seconds. Funny thing though - the drawing 'Retaining Block_mod01.svg' has 6 distinct views and when I select all and combine, three of them disappear.