Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make leak-detector more aggressive when running GC #14526

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Sep 14, 2023

Summary

Ref nodejs/node#48510 (comment)

Test plan

Green CI

@netlify
Copy link

netlify bot commented Sep 14, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1a66d78
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/6503239d8c9f880008ebe918
😎 Deploy Preview https://deploy-preview-14526--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -48,6 +48,17 @@ export default class LeakDetector {
await tick();
}

if (this._isReferenceBeingHeld) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this adds a full 300ms to the runtime of the simplest test I can manage (on a beefy macbook pro). But doing it here means we only have the hit if we believe we're still leaking after running GC, so I think it's worthwhile

Copy link
Member Author

@SimenB SimenB Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this added a lot of time to the unit tests - promising 😅 (so I ended up mocking out the call)

@SimenB SimenB merged commit 485629b into jestjs:main Sep 14, 2023
67 checks passed
@SimenB SimenB deleted the more-aggressive-gc-leak-detector branch September 14, 2023 16:22
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant