Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Considering using resvg-js instead of svg2png? #102

Open
yisibl opened this issue Oct 25, 2021 · 0 comments
Open

Considering using resvg-js instead of svg2png? #102

yisibl opened this issue Oct 25, 2021 · 0 comments

Comments

@yisibl
Copy link

yisibl commented Oct 25, 2021

svg2png has not been maintained for a long time, have you considered using resvg-js instead of svg2png? resvg-js is almost the fastest and most compatible SVG library.

In some scenarios,resvg-js is even faster than sharp.

Benchmark

Running "resize width" suite...
  resvg-js(Rust):
    12 ops/s, ±22.66%   | fastest 🚀

  sharp:
    9 ops/s, ±64.52%    | 25% slower

  skr-canvas(Rust):
    7 ops/s, ±3.72%    | 41.67% slower

  svg2img(canvg and node-canvas):
    6 ops/s, ±16.94%    | slowest, 50% slower

image

See also https://github.com/RazrFalcon/resvg#svg-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant