Conversation
DeployMojo.allProjectsMarked() calls hasDeployExecution() for every reactor project on every module invocation. hasDeployExecution() calls getPluginsAsMap() for each project, producing O(N²) evaluations in a large reactor build (e.g., 4383² ≈ 19.2M calls in a 4383-module project). Fix: cache the filtered list of projects with deploy executions in the first reactor project's plugin context. The list is invariant during a build. Also simplify allProjectsMarked() to only check the projects that actually have deploy executions, rather than iterating the full reactor and testing the disjunction (hasState || !hasDeployExecution). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
Closed as a zero-count campaign run. The managed agent found and proved a useful concurrent-initialization improvement (baseline failed 5/5 barrier runs; candidate passed 15/15; final offline Anthropic list cost: $2.84; estimated total including runtime: $2.87. |
Owner
Author
|
Closing the rejected input mirror; no validated companion was published and this counts as zero. |
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.
Exact mirror of apache#684 at head
b6f2f0f3604c97af00b9d539fd647bafd237abbf.Evaluation context: this PR caches the reactor-wide
projectsWithDeployExecutionlist in a shared first-project plugin context, but initializes it with a plain get/null-check/full scan/put sequence. Under parallel module mojo execution, multiple callers can miss simultaneously and each repeat the full O(N) reactor scan, undermining the promised O(N)-total bound (and relying on unspecific concurrent mutation semantics of the context map). Look only for one minimal behavior-preserving initialization/complexity improvement in the changedDeployMojopath. Preserve exact project filtering and order, empty-reactor behavior, plugin-context ownership/keying, exceptions, deploy-at-end states, and normal single-thread fast-path results. Prove concurrent first access performs one initialization/full scan with a deterministic barrier/counting test or harness, compare the exact head and candidate across at least five runs where practical, run focused tests, and finish with the repository-native clean build; keep no change if safe atomic initialization cannot be proved.