gnodet commented on PR #12653: URL: https://github.com/apache/maven/pull/12653#issuecomment-5150368397
## Benchmark Results (4383-module project, `mvn validate`) Added commit `568b44b` that eliminates unnecessary `builder.build()` calls in pipeline stages by using targeted builder getters instead of full model materialization. ### Changes **model.vm**: Added `getBuilt*()` methods for model-object list fields. When the builder field is null (unmodified), returns `base.getXxx()` at zero cost. When modified, builds just that field's builders — avoids full model build. **5 pipeline stages fixed** to avoid `builder.build()`: - `DefaultPluginConfigurationExpander` → `builder.getBuild()` / `builder.getReporting()` - `DefaultModelNormalizer` (2 methods) → `builder.getBuild()` / `builder.getBuiltDependencies()` - `DefaultDependencyManagementInjector` → `builder.getDependencyManagement()` / `builder.getBuiltDependencies()` - `DefaultPluginManagementInjector` → `builder.getBuild()` - `DefaultModelPathTranslator` → `builder.getBuild()` / `builder.getReporting()` ### Results (3 runs each, average) | Version | Average | vs rc-6 | |---------|---------|---------| | rc-6 baseline | 22,114ms | — | | PR #12652 (pool+sort) | 18,617ms | **-15.8%** | | PR #12653 (before this commit) | 17,739ms | **-19.8%** | | PR #12653 (with this commit) | 17,956ms | **-18.8%** | Performance is within run-to-run variance. The fix eliminates the unnecessary full-model materializations while maintaining the same performance level. All 1130 tests pass (550 in maven-impl, 580 in maven-core). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
