Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEATURE] reduce file extractions on disk #97

Open
nlf opened this issue Oct 12, 2021 · 0 comments
Open

[FEATURE] reduce file extractions on disk #97

nlf opened this issue Oct 12, 2021 · 0 comments
Labels
Enhancement new feature or improvement

Comments

@nlf
Copy link
Contributor

nlf commented Oct 12, 2021

What / Why

https://github.com/npm/pacote/blob/main/lib/file.js#L27-L29

In these lines of code, we extract the full tarball into a temp directory, in order to read only the package.json from it. This seems pretty wasteful when we could extract just the package.json from the tarball into memory and probably save ourselves some work doing disk i/o we'll only throw away.

@darcyclarke darcyclarke added the Enhancement new feature or improvement label Jul 28, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Enhancement new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants