-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Slow packaging of pnpm workspaces project #119
Comments
@SuperchupuDev could this be due to globby/minimatch replacement? |
probably, there are some cases where optimizations can't be applied due to the glob patterns used, a workaround can be ignoring node_modules from globbing. sorry about that. there's some ongoing work in tinyglobby to greatly improve optimizations |
@SuperchupuDev could you submit a PR with the suggested optimization please? Otherwise I would revert the glob replacement for now as the time is 5x and is too high |
should be a one line fix with the ignore option, can do, but first i must ask, is the |
@SuperchupuDev Yeah that could return files from node_modules |
ah, then i'll try to finish the optimizations and publish a new tinyglobby version. meanwhile, can you try to give me a list of glob patterns commonly used by pkg? just to make sure |
@SuperchupuDev Glob patterns used there can be provided by users, them are fetched from scripts and assets provided in pkg configuration in package.json |
interesting. what's the pattern used in the repro provided in this issue? is it the same one that's actually passed to tinyglobby or is it transformed in some way beforehand? |
I have no clue, I think you can try with the provided zip in the issue above? I also have a feel that the reason caused issue listed in #112 |
small update: SuperchupuDev/tinyglobby#69 is in theory done, but it breaks vite's tests. will investigate more tomorrow, and merge once i can make sure it doesn't cause any regressions |
i've opened #121 which should solve this issue, but the usage of |
What version of pkg are you using?
6.0.0, 5.16.0
Which version(s) of pkg work for you?
5.15.0
What version of Node.js are you using?
20.18.0
What operating system are you using?
Windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node20-linux-x64
Describe the Bug
I have a pnpm project using workspaces. build time is significantly slower in pkg 5.16 onwards. Our project builds in 22 seconds using pkg 5.15, and 35 minutes when using pkg 5.16 or later.
Expected Behavior
Build time should be similar for both. Or at least in the same order of magnitude.
To Reproduce
Unzip the reproduce.zip folder.
reproduce.zip
run these commands:
pnpm install time pnpm -r artifacts
then in packages/foo/package.json change the version to ~5.16.0, and repeat the above commands.
For me this are the execution times:
The text was updated successfully, but these errors were encountered: