"Save as" .dxf took nearly an hour for a 1.7MB vector .svg I created by doing Trace Bitmap of a .jpg scan that contained a lot of dirt/shadow noise along one side. I'm using 0.45.1-1.win32 on Vista Business on a Core2Duo 2GHz PC.
If it can't be made faster (ideally taking a couple of minutes rather than nearly an hour), I wish it could at least give a visible indication of its % progress. When it takes that long to make a .dxf and gives no indication of progress, one tends to assume inkscape is broken and kill it.
Thanks,
Craig in NJ
faster "save as" .dxf, or at least a % progress indicator
Re: faster "save as" .dxf, or at least a % progress indicator
you should submit a bug/feature request about the .dxf speed Report a bug
Requests for progress bars have already been made, for tracing and exporting in particular. Heres the general one Ability to display progress bar
Requests for progress bars have already been made, for tracing and exporting in particular. Heres the general one Ability to display progress bar
just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Re: faster "save as" .dxf, or at least a % progress indicator
Looking at the script, I think I know why it's so appallingly slow (because I once made the same mistake in a Python script). It constructs the DXF file in memory as a string, building it by doing something like
over and over again. The trouble is that this operation copies string_so_far into a new string, which makes the overall process O(n^2) - which is fine if the output file is small, but incredibly slow for large output files.
The solution is to build the file as a list of strings, so that the basic operation is like
Then at the end they can be concatenated rapidly by
Please file a bug report, as prkos suggests. If I'm right about the problem, then the fix is trivial. (I've already made a patch, but I haven't tested it yet.)
Code: Select all
string_so_far += some_little_string
over and over again. The trouble is that this operation copies string_so_far into a new string, which makes the overall process O(n^2) - which is fine if the output file is small, but incredibly slow for large output files.
The solution is to build the file as a list of strings, so that the basic operation is like
Code: Select all
list_so_far.append(some_little_string)
Then at the end they can be concatenated rapidly by
Code: Select all
"".join(list_so_far)
Please file a bug report, as prkos suggests. If I'm right about the problem, then the fix is trivial. (I've already made a patch, but I haven't tested it yet.)
Re: faster "save as" .dxf, or at least a % progress indicator
No need to file a bug report now, as I've filed one myself: bug 199922.
Re: faster "save as" .dxf, or at least a % progress indicator
The speed-up is now in the SVN trunk. (But it hasn't been added to the 0.46 branch, so it may not appear in a stable release until 0.47.)