Skip to content
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

Caching unsatisactory #78

Open
ennioVisco opened this issue Apr 27, 2024 · 5 comments
Open

Caching unsatisactory #78

ennioVisco opened this issue Apr 27, 2024 · 5 comments
Labels
question Further information is requested

Comments

@ennioVisco
Copy link

We are testing bun as an alternative to pnpm, but the caching is quite unsatisfactory in a monorepo setting.

In our case, the installation time takes ~37 secs (~2k packages), which is super nice, but we don't seem to be able to reduce this time in subsequent tasks in any way.
Any ideas how to reduce the time in chained tasks (Github Actions) of a workflow?

@xhyrom
Copy link
Collaborator

xhyrom commented May 4, 2024

We don't cache dependencies, only bun versions. Maybe you can try #14 (comment)

@xhyrom xhyrom added the question Further information is requested label May 4, 2024
@ennioVisco
Copy link
Author

We don't cache dependencies, only bun versions. Maybe you can try #14 (comment)

I tried, but it seems to take more time.
Is there any reason why dependencies are not cached?

@xhyrom
Copy link
Collaborator

xhyrom commented May 4, 2024

I think we've come to conclusion that it takes even longer than reinstalling. If I can ask, what was your original time with pnpm?

@ennioVisco
Copy link
Author

ennioVisco commented May 4, 2024

I think we've come to conclusion that it takes even longer than reinstalling. If I can ask, what was your original time with pnpm?

When the cache is present, 11 secs, but it could be related to the fact that in pnpm I can limit the packages to install, while in bun I just have to install them all.

One thing that I still don't get is why do I have to re-install, Isn't there a way to say, "Just restore the state from this directory"?

@ennioVisco
Copy link
Author

ennioVisco commented Jun 4, 2024

I think we've come to conclusion that it takes even longer than reinstalling. If I can ask, what was your original time with pnpm?

I think one of the reasons why it is taking longer is because it is installing and re-linking everything even if it doesn't need to.
This bug should be fixed in 1.1.11, but the caching of #14 (comment) seems to not skip the re-installation correctly, perhaps some files have to be added to the cache that are currently not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants