-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
fix: performance improvement #53
Conversation
The tests are failing because performance with the newly-added test is not good enough without the additional help of the |
if (/[^\\][{[]/.test(str)) { | ||
return true; | ||
} | ||
return isGlob(str); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything weird (different?) by changing the order of the isGlob check and "globby" regexp test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they were OR'ed, I don't think it makes any difference logically. I'm happy to flip it back assuming that doesn't introduce performance regressions.
@Trott can you update the package.json to require is-glob 4.0.3? 🍻 |
Done. |
All green! ✅ |
Published as 6.0.2 - thanks a ton @Trott! |
The performance measuring here is confounded a bit by an
is-glob
performance gotcha that is fixed in micromatch/is-glob#15. Here's what I'm seeing runningtime node -e "require('./')('/('.repeat(500000) + ')')"
on my 2013 Macbook:(The added test will likely fail without the is-glob PR, depending on how performant the test machine is.)