Replace canvas with @napi-rs/canvas
A suggestion for performance improvements.
Reviewing at the benchmark in https://www.npmjs.com/package/@napi-rs/canvas, this will be quick win for faster canvas replacement.
Thanks for your consideration.
If someone wanted to make a PR it would be great to test the difference. Is the platform support the same (macos/linux/windows)?
Due to https://github.com/Automattic/node-canvas/issues/2448 this might also be required to avoid problems with recent node versions
As per the library intro, it is zero dependencies.
Also its still in pre-release and not fully supporting all functions yet as per https://github.com/Brooooooklyn/canvas/issues/113
However, we can test it out first since the performance is much desirable.
I made the switch for a very small project. It was very seamless and immediately fixed a bunch of issues caused by node-canvas memory management bugs. YMMV but my experience with @napi-rs/canvas was fantastic.