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

High memory usage for very big directories #204

Closed
mrmlnc opened this issue Jun 16, 2019 · 2 comments
Closed

High memory usage for very big directories #204

mrmlnc opened this issue Jun 16, 2019 · 2 comments

Comments

@mrmlnc
Copy link
Owner

mrmlnc commented Jun 16, 2019

Environment

  • OS Version: Windows 10 (1903)
  • Node.js Version: 12.4.0

Actual behavior

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Expected behavior

I see entries.

Steps to reproduce

  1. Find directory with 2-4kk entries.
  2. Run fast-glob with ** pattern
@mrmlnc mrmlnc added this to the 3.0.1 milestone Jun 16, 2019
@mrmlnc mrmlnc self-assigned this Jun 16, 2019
@mrmlnc
Copy link
Owner Author

mrmlnc commented Jun 16, 2019

Initial analysis:

  • The _transform method call replace method for each entry. Memory profiling: 786MB
  • The setBasePathForEntryPath method call startsWith method for each entry. Memory profiling: 180MB

Steps:

  • Verify that memory consumption is reduced without calling these methods.

fg_before_after

  • Verify that CPU consumption is reduced without calling these methods.

@mrmlnc
Copy link
Owner Author

mrmlnc commented Jun 22, 2019

Will be fixed with fast-glob@3.0.2.

4.1GB (37s) → 0.8GB (25s)

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

No branches or pull requests

1 participant