svgdigitizer icon indicating copy to clipboard operation
svgdigitizer copied to clipboard

Improve performance of the svgdigitizer for files with embedded figures

Open DunklesArchipel opened this issue 4 years ago • 2 comments

The processing time of svg file with embedded figures is extremely high. Maybe there is a workaround to minimize the processing speed.

DunklesArchipel avatar Jul 10 '21 14:07 DunklesArchipel

The bottleneck is minidom.parse(self.filename)

DunklesArchipel avatar Jul 14 '21 14:07 DunklesArchipel

I think minidom is just not a very fast parser. Parsing the embedded image should be trivial as it only has to do base64 conversion I think. But understandably, performance was maybe not the main concern in that implementation.

http://elektito.com/2017/08/25/benchmarking-python-xml-parsers/

This is a bit old but lxml might be a good option that we could look into.

saraedum avatar Jul 16 '21 18:07 saraedum