Skip to content

fix: memory leak due to un-limited process usage - #18

Merged
hyiso merged 11 commits into
hyiso:mainfrom
SuicaLondon:feat/processes-pool
Jun 11, 2024
Merged

hyiso merged 11 commits into
hyiso:mainfrom
SuicaLondon:feat/processes-pool

Conversation

@SuicaLondon

Copy link
Copy Markdown
Contributor

@hyiso Based on the issue of the high memory usage, and the suggestion @BTMuli provided. I added a new parameter to limit the maximum processes can run at the same time.

  1. I have tested that using Process.kill helps reduce memory usage somewhat. As shown in the image below, macOS does not aggressively terminate processes on its own, so manual termination is necessary.
Screenshot 2024-06-08 at 22 17 28
  1. I tested it on a random open-source project and successfully reduced memory usage.

The default behaviour is the same (Does not set the process parameter).
Run all

If I added the --process 8.
Limited

And this is the memory usage of these two commands
D2AF51B8-34F1-4D90-966C-518C64543E6E_4_5005_c

  1. I have covered it with both unit tests and integration tests.
  2. I have updated the README.md

@hyiso

hyiso commented Jun 11, 2024

Copy link
Copy Markdown
Owner

Thanks for the great work on this PR!

@hyiso hyiso changed the title feat: exclude files pattern fix: memory leak due to un-limited process usage Jun 11, 2024

@hyiso hyiso left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

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