elharo opened a new pull request, #285: URL: https://github.com/apache/maven-remote-resources-plugin/pull/285
Fixes https://github.com/apache/maven-remote-resources-plugin/issues/271 ### Problem `ModelUtils.mergePluginLists()` recomputed `ModelUtils.orderAfterMerge(...)` and called `childContainer.setPlugins(results)` / `childContainer.flushPluginMap()` on **every** iteration of the parent-plugin loop, even though the loop body already accumulates the merged plugins into `assembledPlugins`. `orderAfterMerge` walks both full plugin lists with `results.contains`/`indexOf` linear scans, making the whole merge O(P³) in the worst case for P parent plugins plus repeated plugin-map flushes. The ordering result is identical whether computed once at the end or per-iteration. ### Fix Hoist `orderAfterMerge(...)` + `setPlugins`/`flushPluginMap` out of the loop and compute them once after the loop finishes, using the final `assembledPlugins`. ### Testing No new tests (performance-only change). All existing tests pass, including the failsafe integration tests run with `-Prun-its` (`ITSupplementalArtifact` exercises the supplemental-model merge that uses `mergePluginLists`), plus spotless/checkstyle/RAT via `mvn verify`. -- 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]
