Add significant performance improvements for composer v2#608
Open
xvilo wants to merge 13 commits intorepman-io:masterfrom
Open
Add significant performance improvements for composer v2#608xvilo wants to merge 13 commits intorepman-io:masterfrom
xvilo wants to merge 13 commits intorepman-io:masterfrom
Conversation
I will create a new PR that will add this as on org feature
809616d to
e2c5173
Compare
… assertJsonStringEqualsJsonString
e2c5173 to
0d7119f
Compare
318a74c to
b851200
Compare
Codecov Report
@@ Coverage Diff @@
## master #608 +/- ##
============================================
- Coverage 99.16% 99.14% -0.02%
- Complexity 1910 1917 +7
============================================
Files 301 303 +2
Lines 6072 6092 +20
============================================
+ Hits 6021 6040 +19
- Misses 51 52 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Contributor
Author
|
Possible todo: add test for composer v1 and V2 package endpoint differences. Also test this with an invalid user agent. This will fix the missing coverage |
Member
|
I'm willing to accept this ... but can you add more tests for that? I'm not sure if i'm follow (sorry) and tests will give me more confidence 😉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, Repman is quite slow on the
/packages.jsonendpoint, this due it's requesting all JSON files for every package from S3. From composer 2.0 and onwards, the API has been changed, it does not need to have all packages available any more. But, it now may provide theproviders-urlandmetadata-url. This is where information for a specific package can be found. Thus, it does not have to wait for all packages to be resolved AND it's able to request info about the needed packages only.If people are still using composer 1.0 it will add back the old data, so performance impact will only be solved for people using v2. It will however, show an extra warning.
Curl request statistics for
/packages.jsonrepo endpoint:Currently:
with these changes:
Looking at the total request time for our internal production deployment, we're going from a request time of 24 seconds, to around 260 milliseconds.