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

Bootstrap Maven: replace the met runtime extensions but not their child deps #10014

Merged

Conversation

aloubyansky
Copy link
Member

The current implementation is actually replacing way too many runtime dependencies with their corresponding deployment ones than necessary, i.e. for nothing.
It is based on the assumption that if extension E1 depends on extension E2 then

  • the runtime artifact of E1 depends on the runtime artifact of E2
  • the deployment artifact of E1 depends on the deployment artifact of E2
    This assumption allows us to resolve the complete deployment dependency tree of a given extension with a single Maven request.

The way the resolver works is it resolves the graph of the application dependencies and then navigates all the nodes collecting all the runtime artifacts of Quarkus extensions. Once all of the extensions have been collected, it replaces branches starting with the each found runtime extension artifact with its corresponding deployment artifact dependency branch. (And then re-runs the Maven's version convergence over the new graph)

It would however be enough to only replace the first met runtime extension node with its corresponding deployment node. Replacing the children of the already replaced runtime node is actually a wast of time, given that the branch starting with the original runtime node has already been cut off from the full graph.

@boring-cyborg boring-cyborg bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Jun 15, 2020
@aloubyansky
Copy link
Member Author

The effects of this optimization will depend on the number of extensions and the amount of their dependencies used in the application. I could see that e.g. for an app depending on around 6 extensions (transitively) the resolution time was reduced by almost 30%. From 268ms to 185ms.

@aloubyansky aloubyansky added this to the 1.6.0 - master milestone Jun 15, 2020
… corresponding deployment dependencies but not its children down the dependency tree branch
@gsmet
Copy link
Member

gsmet commented Jun 25, 2020

Let's merge this at the beginning of the next cycle.

@aloubyansky aloubyansky added this to the 1.7.0 - master milestone Jun 25, 2020
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Now is the beginning of the next cycle so looks like a good time to merge this.

@gsmet gsmet merged commit 1bffc42 into quarkusio:master Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants