Closed salistha-shakya closed 2 years ago
Thank you for raising your first issue! Your help to improve svglib is much appreciated!
Note that it might be related to the type of SVG tested, so you should also provide a SVG file which demonstrates the performance regression.
You can try using a profiling tool, like some listed here https://medium.com/@narenandu/profiling-and-visualization-tools-in-python-89a46f578989.
Note that it might be related to the type of SVG tested, so you should also provide a SVG file which demonstrates the performance regression.
The below image can be taken as a sample SVG image which can roughly be around 35 - 40 KB in size.
Thanks, I was able to bisect the performance regression coming from 83d2ec043e094.
It would be nice if you could test the patch in #339
I am currently using svglib 0.9.0 and reportlab to create pdf reports from svg images and other information. While I wanted to upgrade to the latest version of svglib 1.2.1, I notice that the creation of reports in the latest version is much slower than in the older version. This has greatly impacted the overall performance. Can anyone assist me with this issue?
The minimal code for testing is provided below:
Environment:
Ubuntu Python 3.9 reportlab==3.6.9
Test run output:
svglib 0.9.0 Time taken = 0.05732107162475586 svglib 0.9.3 Time taken = 0.06111264228820801 svglib 1.1.0 Time taken = 2.747704267501831 svglib 1.2.1 Time taken = 2.7683348655700684