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 MessagePort leak #1886

Merged
merged 1 commit into from
Aug 3, 2023
Merged

Fix MessagePort leak #1886

merged 1 commit into from
Aug 3, 2023

Conversation

nechaido
Copy link
Member

@nechaido nechaido commented Aug 3, 2023

Generally, it would be better to open only one MessagePort pair between main and worker threads. But this will fix a leak for now/

  • tests and linter show no problems (npm t)
  • tests are added/updated for bug fixes and new features
  • code is properly formatted (npm run fmt)
  • description of changes is added in CHANGELOG.md
  • update .d.ts typings

Here is the summery of the memory snapshots of a dev server after a few hours of running a scheduled task every 10s.

Without the fix:
Screenshot 2023-08-02 at 16 46 24

With the fix:
Screenshot 2023-08-02 at 16 46 36

@tshemsedinov tshemsedinov merged commit 675bd47 into master Aug 3, 2023
12 checks passed
@tshemsedinov tshemsedinov deleted the fix-mem-leak branch August 3, 2023 08:35
@tshemsedinov
Copy link
Member

Related issue: #1740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants