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

make use of packages.json includes to make hash based caching possible #132

Merged
merged 1 commit into from Apr 25, 2014

Conversation

Flyingmana
Copy link
Contributor

No description provided.

@Flyingmana
Copy link
Contributor Author

refactoring some parts completely would probably make more sense, but this way we have at least a simple caching, which is for some users noticeable when the packages.json is already over 10M big.

@stof
Copy link
Contributor

stof commented Apr 24, 2014

@Seldaek should we build it on the providers system rather than the old includes system ?

@naderman
Copy link
Member

actually I think we should get rid of the providers eventually as we don't need that mechanism anymore after the changes to how provide/replace work. We know an exact list of package names now.

@naderman
Copy link
Member

So using the old includes system here is actually fine I think, and we'll need to come up with something new to make things more efficient in the long run.

@Flyingmana
Copy link
Contributor Author

Yeah, for the actual issue of caching, this is the simplest solution.
the providers system is more for splitting them complete by package name, which on the downside could create a lot of requests on the first usage. For our use case there were some possibilities to optimize, but I dont have an idea to make them reusable for others. Also @Seldaek mentioned he works on a alternative, so I suggest we wait for this, before we invest to much time.

@stof
Copy link
Contributor

stof commented Apr 24, 2014

@naderman the providers system in the repository spec is still needed: it allows loading only some of the subfiles. The old includes on the other hand simply splits into mutliple files without structure (the first version of packagist used this to group old releases together as the file was expected to change less often). Using includes only in the repository spec would mean you load the 103 914 packages available on Packagist each time you run composer update, and you will then need several GB of memory for this.

For small Satis repos, includes will generally be enough indeed, but then, some people are also using Satis with bigger repos (mirroring part of Packagist for instance). So the question of using one or the other still stands.
Using includes here improves caching indeed, but it still loads all metadata at once, thus not helping for bigger repos

@naderman
Copy link
Member

@stof I am aware of what the point of providers is. I was saying we will need something else, as we will want to load individual packages not everything providing a name anymore. Please read my response. Hence includes here will be just fine for now, until we come up with a new mechanism instead of providers which we can then also use here. Which is what I said to begin with.

@Flyingmana
Copy link
Contributor Author

so is there anything blocking the merge of this pull request I can help with?

@naderman
Copy link
Member

Nope, all good.

naderman added a commit that referenced this pull request Apr 25, 2014
make use of packages.json includes to make hash based caching possible
@naderman naderman merged commit f44c455 into composer:master Apr 25, 2014
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.

None yet

3 participants