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

[Bug]: memory leak when a worker accesses a file in the asar archive package for the first time #36597

Closed
3 tasks done
xuwanghu opened this issue Dec 7, 2022 · 0 comments · Fixed by #36600
Closed
3 tasks done
Labels

Comments

@xuwanghu
Copy link
Contributor

xuwanghu commented Dec 7, 2022

Preflight Checklist

Electron Version

17.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10 version 21H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

After a worker ends, the memory usage falls back to before the worker starts.

Actual Behavior

Each time a worker is created, the memory usage will be increased a little. Even if the worker is finished, the memory usage will not be reduced.
!!!!!!!!!!!memoryLeak

Testcase Gist URL

https://gist.github.com/xuwanghu/d61b511abf80aa691375cdfd30a8474e

Additional Information

The purpose of adding so many dependencies is to make the ASAR file large enough so that the memory leaks are more noticeable.
How to Reproduce:
it's on windows:

  1. npm install
  2. yarn dist
  3. run the /dist/win-unpacked/test_leak_for_worker.exe
  4. use the Performance Monitor to monitor its working set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant