Memory leak related to ethers.js? #4437
Unanswered
dawidstezycki
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
For a while we've been struggling with memory leak when running tests (jest v29.5.0) and recently it got out of hand as we've been adding more and more test cases. We are using NestJS as a framework and use ethers.js v6.7.0 to interact with blockchain. The part that's responsible for blockchain stuff is a separate lib and imported as a module to the main module so that we can mock it for testing. Unfortunately, even with that module mocked, it seems to take up a lot of the heap in the snapshots I have taken during test runs to analyse the memory leak. Specifically, a lot of those internal array objects seem to stem from "ens_beautify" or "ens_normalize". I'm not great at interpreting those snapshots but I've seen those functions enough to make me think something is up. Has anybody experienced that? Is there a way for me to confirm this is indeed the problem?
Beta Was this translation helpful? Give feedback.
All reactions