svgexport
svgexport copied to clipboard
Performance for svg -> png has decreased between 0.2.8 and 0.3.2
The performance when converting svg files to png has decreased quite a bit between those versions. It's most likely related to the PhantomJS changes. It's not a bug in that sense and it's not critical. I just wanted to mention it, as the difference is pretty huge.
For a sample file, real processing time went from 0.7 seconds to 12.8 seconds. The generated files are the same.
This is caused by the switch from the phantomjs2 package to phantomjs-prebuilt. You can safely reverse commit 75250e689df4c5830c40099c4738ad1a68cf2702 to speed it up again.
Before I changed it back I couldn't even run the test suite as it timed out (> 5000ms), now with the commit reversed I have no problems at all.
@shakiba why have you switched to phantomjs-prebuilt? Unless there's a good reason, It's probably best to switch back to phantomjs2.
@mpfluger if you're interested, I opened up a pull request to revert back to phantomjs2 which fixes the performance issues. See #42 👍
If I remember correctly this was the history: Originally we used npm:phantomjs
, then at some point to use PhantomJS 2 (when npm:phantomjs-prebuilt
was not published yet) we used npm:phantomjs2
. However later npm:phantomjs
renamed to npm:phantomjs-prebuilt
and updated to PhantomJS2, so we used we used npm:phantomjs-prebuilt
.
npm:phantomjs2
is fork of npm:phantomjs-prebuilt
, I'm not sure why it is slower.
@mdeboer Thanks for PR! I'll try to figure out what's the problem is with phantomjs-prebuilt
and merge your PR as soon as I can.
Thanks @shakiba and @mdeboer for investigating!