smarr / ReBenchDB

ReBenchDB records benchmark results and provides customizable reporting to track and analyze run-time performance of software programs.
MIT License
12 stars 6 forks source link

Update to Chart.js 4 and use my own chartjs-node-canvas #190

Closed smarr closed 5 months ago

smarr commented 5 months ago

This PR updates to Chart.js 4 and uses a version of chartjs-node-canvas that does not rely on freshRequire and various other bits of aggressive use of require (presumably to isolate plugins) and thereby avoids leaking memory on every chart.

Thus, this PR addresses #188 as far as I can see. At least in manual testing, the memory profiles look clearly different between before and after.

Though, before this PR can be merged, https://github.com/sgratzl/chartjs-chart-boxplot/pull/109 needs to be published, or I need to apply some local patches to allow chartjs-chart-boxplot to work on Node.js.

The PR updates also various other dependencies.

smarr commented 5 months ago

The patch-package tool is useful to work around the issue in the upstream package. So, I am using this for chartjs-chart-boxplot. Though, should keep track of upstream whether the PR gets merged.