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

Fix slow pantry caching by using memory as much as possible #78

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

felipecrs
Copy link
Contributor

@felipecrs
Copy link
Contributor Author

Before:

> rm -rf ~/.cache/pkgx ~/.local/share/pkgx ~/.pkgx
> time deno task run --sync
Task run deno run --unstable-fs --unstable-ffi -A ./entrypoint.ts "--sync"

deno task run --sync  1.67s user 2.52s system 7% cpu 56.122 total

After:

> rm -rf ~/.cache/pkgx ~/.local/share/pkgx ~/.pkgx
> time deno task run --sync
Task run deno run --unstable-fs --unstable-ffi -A ./entrypoint.ts "--sync"

deno task run --sync  1.22s user 0.90s system 77% cpu 2.759 total

1 similar comment
@felipecrs
Copy link
Contributor Author

felipecrs commented Sep 25, 2024

Before:

> rm -rf ~/.cache/pkgx ~/.local/share/pkgx ~/.pkgx
> time deno task run --sync
Task run deno run --unstable-fs --unstable-ffi -A ./entrypoint.ts "--sync"

deno task run --sync  1.67s user 2.52s system 7% cpu 56.122 total

After:

> rm -rf ~/.cache/pkgx ~/.local/share/pkgx ~/.pkgx
> time deno task run --sync
Task run deno run --unstable-fs --unstable-ffi -A ./entrypoint.ts "--sync"

deno task run --sync  1.22s user 0.90s system 77% cpu 2.759 total

@felipecrs
Copy link
Contributor Author

@mxcl, CI failure is not related.

@mxcl
Copy link
Member

mxcl commented Sep 25, 2024

Amazing!

@mxcl mxcl merged commit 5ae6c80 into pkgxdev:main Sep 25, 2024
8 checks passed
@felipecrs felipecrs deleted the fix-slow-cache branch September 25, 2024 12:06
felipecrs added a commit to felipecrs/dotfiles that referenced this pull request Sep 25, 2024
felipecrs added a commit to felipecrs/docker-images that referenced this pull request Sep 25, 2024
@jhheider
Copy link
Contributor

👏

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

Successfully merging this pull request may close these issues.

pkgx --sync on main takes around 1 minute while in v1.1.6 takes 1 second
3 participants