Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Minimize 'locatePom()'-calls in PolyglotModelManager #242

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

HannesWell
Copy link
Contributor

For some Mapping implementations calling locatePom() can be a relatively expensive operation, for example because it includes many file-system interactions.

Because only the result of the mapping with the highest priority is returned eventually, findPom() and determineFlavourFromPom() can be speed-up if Mappings are processed in descending priority-order and simply return the first encountered result. Just like the other get*() methods do.

Additionally this PR simplifies the implementation of getSortedMappings() at bit.

For some Mapping implementations calling 'locatePom()' can be a
relatively expensive operation, for example because it includes many
file-system interactions.

Because only the result of the mapping with the highest priority is
returned eventually, 'findPom()' and 'determineFlavourFromPom()' can be
speed-up if Mappings are processed in descending priority-order and
simply return the first encountered result.
Just like the get*() methods do.
@HannesWell
Copy link
Contributor Author

@jvanzyl can you please have a look at this PR?

@fbricon fbricon merged commit 275ce43 into takari:master Aug 26, 2022
@HannesWell HannesWell deleted the reduceLocatePomCalls branch August 28, 2022 19:23
@HannesWell
Copy link
Contributor Author

Thank you @fbricon do you know of any plans about the next release that contains this change?
And are there snapshot builds available anywhere?

@jvanzyl
Copy link
Contributor

jvanzyl commented Aug 28, 2022

@HannesWell I just made a release, should be in Maven Central shortly.

@HannesWell
Copy link
Contributor Author

Great! Thank you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants