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-7677] Maven slowness improvement #989

Merged
merged 5 commits into from
Feb 23, 2023

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Feb 8, 2023

The crux was in resolver 1.9.5, but there are other "low hanging fruits" like delegate created on a "hot method".


https://issues.apache.org/jira/browse/MNG-7677

The change is effectively in resolver 1.9.5, but there are
other "low hanging fruits" like delegate created on a
"hot method".

---

https://issues.apache.org/jira/browse/MNG-7677
@cstamas cstamas self-assigned this Feb 8, 2023
@cstamas cstamas marked this pull request as ready for review February 8, 2023 15:08
@michael-o michael-o marked this pull request as draft February 9, 2023 19:02
@cstamas
Copy link
Member Author

cstamas commented Feb 15, 2023

This PR will pass once apache/maven-resolver#245 is merged, built and deployed by Jenkins, and artifacts picked up by this PR.

@cstamas
Copy link
Member Author

cstamas commented Feb 15, 2023

After apache/maven-resolver#245 merged (and deployed by CI), restarted all the CI jobs on this PR, and they are expected to pass OK, as wrote above.

cstamas added a commit to cstamas/maven that referenced this pull request Feb 20, 2023
Of the resolver (downloading vs downloaded), just report after
the fact it was downloaded (or failed to download), no need
for double lines for same resource/dependency.

This experiment includes apache#989
but does not affects it (just to create "closer" Maven to
upcoming release).

As one could expect, IT suite does fail with this change
as some ITs do assert against the build logs (but the build
itself did pass OK). Failing ITs:

[ERROR] Failures:
[ERROR]   MavenITmng6240PluginExtensionAetherProvider.testPluginExtensionDependingOnMavenAetherProvider:83->AbstractMavenIntegrationTestCase.assertEquals:668->AbstractMavenIntegrationTestCase.assertEquals:673 expected: <2> but was: <0>
[INFO]
[ERROR] Tests run: 885, Failures: 1, Errors: 0, Skipped: 80

As to be expected, the IT asserts there is log line without
progress (so DownloadING one, the one that is removed).
@michael-o
Copy link
Member

So this need to be a singleton?

@cstamas
Copy link
Member Author

cstamas commented Feb 20, 2023

So this need to be a singleton?

I'd rather say: given this class is stateless, it CAN be singleton/shared/reused, instead to be re-instantiated for each call of this "hot" method.

@michael-o
Copy link
Member

So this need to be a singleton?

I'd rather say: given this class is stateless, it CAN be singleton/shared/reused, instead to be re-instantiated for each call of this "hot" method.

I see, makes sense. No reason to create new objects all the time.

@cstamas cstamas changed the title [MNG-7677] Maven slowness addressed [MNG-7677] Maven slowness improvement Feb 23, 2023
@cstamas cstamas merged commit ecc89f0 into apache:maven-3.9.x Feb 23, 2023
@cstamas cstamas deleted the maven-3.9.x-MNG-7677-patch branch February 23, 2023 08:51
asfgit pushed a commit that referenced this pull request Mar 9, 2023
The crux was  in resolver 1.9.5, but there are other "low hanging fruits" like delegate created on a "hot method".

---

https://issues.apache.org/jira/browse/MNG-7677
@gnodet gnodet mentioned this pull request May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants