jjkester commented on PR #1821: URL: https://github.com/apache/maven/pull/1821#issuecomment-2423701084
> @jjkester could you please add the "empty check" to the beginning of the method (so avoid any work and allocation if there is nothing to be done)? like in #1823 I did not add one because in practice I do not expect many projects to have zero dependencies. If a project does have zero dependencies, the only "waste" is the allocation of an unnecessary `ArrayList` of size 0, and unnecessarily creating a new `Model` instance with that list. Personally I don't think that optimalization (given the assumed rarity) is worth the additional complexity in the method, which is already quite complex. If my assumption and/or preference is not in line with the general way in which Maven is coded, I'm happy to add the optimalization, but I'd like to check the necessity first. -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org