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

[MNG-6638] - Prevent reparsing POMs in MavenMetadataSource #244

Closed
wants to merge 1 commit into from

Conversation

oehme
Copy link
Contributor

@oehme oehme commented Apr 14, 2019

If a dependency on another project is found, don't parse its
POM again, but instead use the model we already have in memory.

This saves a large amount of time and memory for builds that have
lots of subprojects and dependencies between them.

The approach was directly copied from DefaultArtifactDescriptorReader,
which does the same optimization.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MNG-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@oehme
Copy link
Contributor Author

oehme commented Apr 14, 2019

Here's an allocation profile showing the severe impact this has on plugins like enforcer and assembly (jar-with-dependencies). The POM parsing overhead is marked in pink.

Screenshot 2019-04-14 at 14 44 47

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Very nice idea!

@slachiewicz
Copy link
Member

Copy link
Member

@olamy olamy left a comment

Choose a reason for hiding this comment

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

LGTM

@michael-o
Copy link
Member

@oehme Can you please rebase?

If a dependency on another project is found, don't parse its
POM again, but instead use the model we already have in memory.

This saves a large amount of time and memory for builds that have
lots of subprojects and dependencies between them.

The approach was directly copied from DefaultArtifactDescriptorReader,
which does the same optimization.
@oehme oehme force-pushed the oehme/leaner-project-dependencies branch from 542a9f9 to 2ab273a Compare May 27, 2019 16:04
@oehme
Copy link
Contributor Author

oehme commented May 27, 2019

Done

@asfgit asfgit closed this in d3ace78 May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants