You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more an attempt to document the issue (there's a change here that others might want to try though: smarr@66b8e9b).
I assume ChartjsNodeCanvas is designed to ensure perfect isolation of plugins, and supporting all kind of Chart.js plugins. To achieve this, I assume, the idea was to just require plugins and other code separately to ensure complete isolation.
However, this also leads to high memory overhead and additional costs such as requiring extra compilation by Node.js for every single canvas. So, creating a canvas is prohibitively expensive, perhaps more so that the documentation suggests already. The other problem is that requiring large chunks of code again and again leaks memory for the code, and then for the native compilation. Node.js doesn't really like this.
In my fork, I stripped out all require()/freshRequire() calls since I don't need the support for legacy plugins and plugin isolation. So, that's not something I can generally recommend. However, it comes at major performance gains of cutting chart render time by 50-80% in my case.
The text was updated successfully, but these errors were encountered:
This is more an attempt to document the issue (there's a change here that others might want to try though: smarr@66b8e9b).
I assume ChartjsNodeCanvas is designed to ensure perfect isolation of plugins, and supporting all kind of Chart.js plugins. To achieve this, I assume, the idea was to just require plugins and other code separately to ensure complete isolation.
However, this also leads to high memory overhead and additional costs such as requiring extra compilation by Node.js for every single canvas. So, creating a canvas is prohibitively expensive, perhaps more so that the documentation suggests already. The other problem is that requiring large chunks of code again and again leaks memory for the code, and then for the native compilation. Node.js doesn't really like this.
In my fork, I stripped out all require()/freshRequire() calls since I don't need the support for legacy plugins and plugin isolation. So, that's not something I can generally recommend. However, it comes at major performance gains of cutting chart render time by 50-80% in my case.
The text was updated successfully, but these errors were encountered: