-
Notifications
You must be signed in to change notification settings - Fork 12
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
Small performance optimizations #83
base: main
Are you sure you want to change the base?
Conversation
This reverts commit ab23ee1.
commit: |
Sorry for the extra linting commits. Biome doesn't work on my machine. |
interesting, i do value performance over code style, but i'd like to first check if this makes any meaningful perf improvement, the vast majority of the glob time in general is spent doing I/O i think which is the area that could benefit the most from optimizations. i'll check this out in more detail later, there's some work i need to do first. thanks for the effort! |
I tested it with your test fixture and it roughly was the same performance, but my version was more stable in terms of performance, so I do believe you see the greater benefit if you create a fixture with a ton of files and glob patterns, because I only adjusted the performance inside loops. I'm also still trying to figure out an alternative to |
Hi, I wanted to contribute to this amazing project and came across some tiny performance optimizations that could be made. I tried not to change too much code or break your coding style. Those are very minor changes that only benefit projects and tools processing a large number of paths and globs.
The PR mainly focuses on stabilizing the performance by:
.length
or.root
map
to transforming it in-placeAlso, tinyglobby is now ~25 bytes smaller.