-
-
Notifications
You must be signed in to change notification settings - Fork 20
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: upgrade tinyglobby #121
base: main
Are you sure you want to change the base?
Conversation
ci is failing, will debug tomorrow |
Could you also test if there are improvements with the Seems now it went down to 2min: https://github.com/yao-pkg/pkg/actions/runs/11675697212/job/32510712730?pr=121#step:7:20 :) I think there is still range of improvement here. Could you try enabling that test also for windows and mac? Just remove this lines: pkg/test/test-80-compression-node-opcua/main.js Lines 17 to 21 in 8913dff
|
I also created #122, I would like to compare performances of tests in this two PR |
In fact seems this is faster 👍🏼 |
okay i see why at least some tests fail, it's due to this project using directory expansion, which means that globbing |
@SuperchupuDev Yep understood, could you fix that? |
trying |
okay, fixing it would just make all patterns dynamic, making performance not change whatsoever. we need a better solution. there needs to be a refactor in the walker logic so that all patterns are pushed into an array and then when all of them are collected call |
@SuperchupuDev Makes sense, agreee |
@SuperchupuDev News on this? |
been busy with university, i have to debug and figure out why vite's tests fail with tinyglobby's upcoming version (which should fix the perf issue), could try today |
f667483
to
20d13d8
Compare
20d13d8
to
8d47f55
Compare
@robertsLando changed this pr to the upcoming tinyglobby version instead, can you compare performance again? |
Here the time was 2 min: https://github.com/yao-pkg/pkg/actions/runs/11675697212/job/32510712730?pr=121#step:7:20 Now it's 4 minutes: https://github.com/yao-pkg/pkg/actions/runs/12070674103/job/33660704757?pr=121#step:7:20 On master it's 4 minutes as well: https://github.com/yao-pkg/pkg/actions/runs/11971054226/job/33375067804#step:7:20 |
okay, thanks. fyi it's 4 minutes on fast-glob as well: https://github.com/yao-pkg/pkg/actions/runs/11703987586/job/32595478258?pr=122#step:7:20 |
although this pr should solve the perf issue reported in #119, for the record, if you want to avoid unnecesary globbing one solution can be setting |
Ok thanks for that! I would not go for that option as I think there will be too much edge cases to handle and I'm quite sure it could cause some unexpected issues I don't want to deal with right now. We can merge this if it's ready 👍🏼 |
I correct myself: we can merge this once you have a release for tinyglobby :) |
fixes #119
the problem with glob usage in this project is that
globSync
is called multiple times which isn't optimal, as it forcestinyglobby
to traverse the filesystem multiple times. in theory,globSync
could be called just once during the walking process, but that would be a bigger refactor, although a possible oneEDIT: this pr upgrades tinyglobby, ignore the text below this
it looks like under a default config most patterns passed to
globSync
aren't even globs, so this PR avoids unnecessaryglobSync
calls when none of the patterns are globsscreenshot of patterns passed to tinyglobby in 6.1.0, each log is a different glob call
locally (windows) this change makes it faster than 5.15.0, with the reproduction from #119 taking 25s in 5.15.0 and 13s in latest with the change (latest without the change took too long to measure)