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

Use fast-glob #99

Open
jasonkuhrt opened this issue Nov 30, 2020 · 3 comments
Open

Use fast-glob #99

jasonkuhrt opened this issue Nov 30, 2020 · 3 comments

Comments

@jasonkuhrt
Copy link

On Nexus we discovered that fs-jetpack's find was very slow. When we investigated why, it turned out to be because ignores were only being executed as an in-memory filter, not actually changing how the disk was traversed (IO). This had huge consequences (toward a full 1000ms of latency on project boot).

We solved our problems by switching to fast-glob.

The key for us was https://github.com/mrmlnc/fast-glob#how-to-exclude-directory-from-reading.

Given filters are actually affecting the IO.

Maybe there are some downsides I haven't thought of but right now I'm pretty sure that it would be great for fs-jetpack to change its find engine to it.

@jasonkuhrt
Copy link
Author

Here is the commit where we switched away from fs-jetpack find prisma-labs/graphql-framework-experiment@47b0911

@szwacz
Copy link
Owner

szwacz commented Jan 19, 2021

The use case is that you have a big directory nested somewhere inside the directory that the find was performed on, and you don't want to touch that big directory? Or is this something more nuanced?

@jasonkuhrt
Copy link
Author

@szwacz yes I think that's it

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

No branches or pull requests

2 participants