-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[MNG-6773] Slow extension key creation in DefaultExtensionRealmCache under lock #288
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
Conversation
|
Hi, any update on this? |
|
For this type of changes I would like to see an ICLA. I'd like to see the results with https://github.com/quick-perf/maven-test-bench to get the confirmation of this fix. |
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I left just a question
maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java
Outdated
Show resolved
Hide resolved
Robert, performance depends on file system. Slower FS - better numbers. In my case (rather slow virtual desktop which nowadays is guess a common case in enterprise worlds) results are: New -T1 |
Cached file information to avoid IO on subsequent File#getLastModified/size calls
installing watch service to invalidate cached entries
|
@AlexanderAshitkin Can you provide the exact steps? I will try on two completely different machines. One low power, another powerful HPE server. |
Hi
for our 600-modules project difference is 13 vs 5 seconds. this could be further split in 2 phases - interim builds population and interim builds processing. The optimization helps to interim builds processing and win is 9 vs 1 sec for this piece in our case |
|
will someone merge it? |
|
@eolivelli could you please merge this |
| * Control flag to restore legacy filesystem behaviour in case issues. | ||
| */ | ||
| protected static class CacheKey | ||
| private final boolean useFsKey = Boolean.getBoolean( "maven.extensions.fskey" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need for this. It will only make it harder to maintain.
* [MNG-6847] Use diamond operator Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.UseDiamondOperator?organizationId=QXBhY2hlIE1hdmVu Co-authored-by: Moderne <team@moderne.io> * Restore core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/src/main/java/org/apache/maven/its/mng5581/lifecyclemappingdelegate/TestLifecycleMappingDelegate.java --------- Co-authored-by: Moderne <team@moderne.io>
|
Resolve #8447 |
Synopsis
Synchronized method DefaultProjectBuildingHelper#createProjectRealm on project critical path invokes io under lock by calling ProjectRealmCache#createKey
That's restricts scaling of graph build horizontally by invoking more threads
Proposal:
Cache results of first file access to prevent subsequent io
Risks:
Options:
Following this checklist to help us incorporate your
contribution quickly and easily:
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.
[MNG-XXX] - Fixes bug in ApproximateQuantiles,where you replace
MNG-XXXwith the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
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.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.