-
Notifications
You must be signed in to change notification settings - Fork 3
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
Get rid of matchesGlobPatterns
#272
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clarification and motivation
Thanks to the recent profiling performed by @aeqz, I noted the that
matchesGlobPatterns
takes so much time. And hilariously, looks like we somehow fell into that very problem - we compile glob patterns every time we want to perform a match instead of compiling once in advance.I would try to concentrate on removing
matchesGlobPatterns
(it joins glob compilation with matching which feels like an anti-pattern), compiling globs early, and carrying around the compiled globs.Note, that
matchesGlobPattern
call insidetoScan
is shown to take 32.37% of the time at that flamegraph. But this call constitutes that minority of our logic that is not parallelized, so the gain measured in time will be larger, would not be surprised if it eventually takes half of the time.Acceptance criteria
matchesGlobPatterns
is removed.The text was updated successfully, but these errors were encountered: