slow DXF export

Bug #199922 reported by sas
10
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Aaron C Spike

Bug Description

Someone on InkscapeForum.com mentioned that DXF export had taken nearly an hour on a large file: http://www.inkscapeforum.com/viewtopic.php?f=18&t=674 . See that page for my reply explaining why the Python script is so slow, and how it can be made much faster. (Briefly: it's making what the Python Wiki calls "a very common and catastrophic mistake when building large strings".)

I'm attaching a patch to fix this.

A suitable test file can be found on OCAL: http://openclipart.org/media/files/johnny_automatic/4542 . I chose this one because it's large enough to show the problem, but small enough not to take an hour. With this test file, the current version of dxf_outlines.py takes over 6 minutes on my computer, but the patched version takes only 16 seconds.

Revision history for this message
sas (sas-sas) wrote :
Revision history for this message
Tom Davidson (tjd-mit) wrote :

Thanks for the patch, sas!

Hey Aaron, could you check this out and apply it if it passes muster?

Changed in inkscape:
assignee: nobody → acspike
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Aaron C Spike (acspike) wrote :

fantastic! thanks.

Revision history for this message
Aaron C Spike (acspike) wrote :

Committed revision 17755.

Changed in inkscape:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.