You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saving long paths with a lot of segments is really slow. I figured out svgwrite runs by default with some debug flags. Svgwrite does some validation stuff like checking syntax of path's d attribute. The parser that they use runs amok.
I think the best approach is to disable debug mode and to turn validation off (#7). The data you put into svgwrite is valid, paths are syntactically correct. And if some arguments are broken, most programs can deal with it.
The text was updated successfully, but these errors were encountered:
Hi derVedro, thanks for pointing this out!
I don't know what the debug flag in svgwrite.Drawing does and I'm not sure why the makers of svgwrite set this flag to True by default. Without that knowledge I'm too nervous to merge in your requested default overriding of their default. Especially since...
A simple (though not obvious) workaround also exists:
from svgpathtools import *
wsvg(Path(Line(0, 100+100j)), svg_attributes={'debug': False})
From the one %timeit test I did, this does appear to provide a significant speed increase. I just made a note of this in the disvg docstring.
Saving long paths with a lot of segments is really slow. I figured out svgwrite runs by default with some debug flags. Svgwrite does some validation stuff like checking syntax of path's d attribute. The parser that they use runs amok.
I think the best approach is to disable debug mode and to turn validation off (#7). The data you put into svgwrite is valid, paths are syntactically correct. And if some arguments are broken, most programs can deal with it.
The text was updated successfully, but these errors were encountered: