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

supported smaller package metadata API #3112

Merged
merged 3 commits into from
Apr 12, 2017

Conversation

bestander
Copy link
Member

@bestander bestander commented Apr 11, 2017

Summary

According to https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md we can now use smaller metadata API that does not have all the unnecessary descriptions etc.

Test plan

React Native:

packages metadata before change metadata after change
26MB 5.46MB 3.31MB

material2:

packages metadata before change metadata after change
70MB 8.89MB 5.41MB

Results:

This PR reduces metadata downloads by 40%.
Full metadata to packages is about 10-20% of total download.

There should be some minor improvements for Yarn memory now that it does not need to pass around the extra meta data.

@bestander bestander changed the title supported smaller package metadata API [DON'T MERGE YET] supported smaller package metadata API Apr 11, 2017
@bestander bestander changed the title [DON'T MERGE YET] supported smaller package metadata API supported smaller package metadata API Apr 11, 2017
@bestander
Copy link
Member Author

For review: avoid the last commit

@cpojer
Copy link
Contributor

cpojer commented Apr 12, 2017

Nice!

const headers = {};
const headers = {
'Accept': 'application/vnd.npm.install-v1+json'
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that count as one line? :P

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.

3 participants