Skip to content

perf: batch POM resolution and cache parent POM lookups#802

Open
MalickBurger wants to merge 1 commit intomasterfrom
perf/batch-pom-resolution
Open

perf: batch POM resolution and cache parent POM lookups#802
MalickBurger wants to merge 1 commit intomasterfrom
perf/batch-pom-resolution

Conversation

@MalickBurger
Copy link
Copy Markdown
Contributor

Resolve all component POM files in a single Gradle artifact resolution query instead of N individual calls. Share a single ModelResolver instance per project so parent POM resolutions are cached across components.

Resolve all component POM files in a single Gradle artifact resolution
query instead of N individual calls. Share a single ModelResolver instance
per project so parent POM resolutions are cached across components.

Signed-off-by: MalickBurger <malickjackburger@gmail.com>
@MalickBurger MalickBurger marked this pull request as ready for review March 13, 2026 14:00
@MalickBurger MalickBurger requested a review from a team as a code owner March 13, 2026 14:00
Copy link
Copy Markdown
Member

@skhokhlov skhokhlov left a comment

Choose a reason for hiding this comment

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

It would be nice if you attach benchmark results before and after the change. https://github.com/gradle/gradle-profiler?tab=readme-ov-file#benchmarking-a-build

return;
}

LOGGER.info("CycloneDX: Batch resolving {} POM files", componentIds.size());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All log messages in this project follow pattern LOGGER.log("{} Message", LOG_PREFIX). It helps to identify plugin logs in Gradle build. Please use it in this PR too.

Example: https://github.com/CycloneDX/cyclonedx-gradle-plugin/blob/master/src/main/java/org/cyclonedx/gradle/CyclonedxPlugin.java#L160-L164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants