Skip to content
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

Interpolator interface: allow to interpolate by setting the list of ValueSources and InterpolationPostProcessor #21

Open
belingueres opened this issue May 28, 2019 · 0 comments

Comments

@belingueres
Copy link
Contributor

Looking at: https://github.com/apache/maven/blob/a2b800de32cdb9adc1e64a43a0fc32e3ba878103/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java#L233

Adding and removing repeatedly in a list of ValueSources and InterpolationPostProcessor is costly, mainly the final removing ValueSource and InterpolationPostProcessor part since remove is an O(n) operation on an ArrayList.

Instead, modify the Interpolator interface to either directly set both lists and interpolate from there, or either add a new interpolate method that takes both lists as parameters.

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

No branches or pull requests

2 participants