generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
We are trying to switch to this library from node-canvas. Everything seems to be fine and working except for our e2e tests.
We have some number of tests, and in some tests we use canvas and in other tests canvas is not used. During the tests we see memory leaks (about +60mb on each test).
I found that these memory leaks can be partially fixed if the import from @napi-rs/canvas is dynamic, i.e. the import is only executed in tests that use canvas. In this case, I only observe memory leaks in a part of the tests (using canvas). There seems to be some problem with the import in test environment based on that
In basic usage while the server is running, we don't see any memory leaks
Environment
- node: v22.13.1
- @napi-rs/canvas: v0.1.68
- jest: v29.2.2
- OS: macOS arm / debian 11 x64
Metadata
Metadata
Assignees
Labels
No labels