-
Notifications
You must be signed in to change notification settings - Fork 10
Add option to sort the entries of PlexusIoFileResourceCollection #18
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
Comments
PlexusIoFileResourceCollection
This should be solved with a discrete implementatoin, shouldn't it? |
@michael-o I'm not sure if I understood your question. You mean that we should have separate class and not do it in |
Yes, I guess so. Sorting is overhead. |
@michael-o I agree. The default definitely should be as it is now - not sorted. The idea is to have some way of telling the order(probably by providing comparator). Either in |
Maybe the collection should not be touched at all the consumer has to sort while processing because the collection is intermediate. Or we provide the option to have configurable iterators which sort only when necessary. |
This is an option. But then the archiver has to re-arrange the entries of the archive. In the general case this means additional IO operations. Unfortunately the archiver could not just get all entries and sort them before creating the archive. Some That is why I don't think sorting should be added to all
I don't think we have such option right now. But as sorting does not make sense for all |
Thanks, so you are saying this should be completely delegated to the client consuming those collections, i.e, sorting it and leaving |
option added |
Currently
PlexusIoFileResourceCollection
does not return the entries in any particular order. For some use cases (such as reproducible builds) it is useful if some predictable order could be set.The text was updated successfully, but these errors were encountered: