-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improve rendering performance #39
Comments
Yes, it's actually unfair to compare wasm with a library that generates binaries like resvg-js, wasm itself will have some overhead. As a wasm library, we can just make a compromise between performance and file size. |
The original svg takes forever to render with wasm. Not even possible to get a valid timeline profiling report. I had to make smaller width/height: viewBox="0 0 744 1052" height="100" width="142" Timeline shows major cost in |
For example, this file renders very slowly: https://commons.wikimedia.org/wiki/File:Anime_Girl.svg
Improvements: https://github.com/yisibl/resvg-js/blob/443d1c3de7cf2dc72c87299cb046e57621062654/Cargo.toml#L29-L34
This increases the size of the wasm file, but it improves rendering performance to some extent, and I think it's worth it.
Fundamentally, it may require upstream resvg to optimize.
The text was updated successfully, but these errors were encountered: