Re: [PR] Use StreamSupport and spliterator to create a strea m for ResourceCollection [ant]

bodewig (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.ant.devel
Message-ID <PR_kwDOATT2FM6gw4gW-9e8399e2-e49b-4305-9ace-103e93abe269@gitbox.apache.org>
bodewig commented on PR #223:
URL: https://github.com/apache/ant/pull/223#issuecomment-3194581653

   So here is what I see right now. There are ResourceCollection implementation where using `size` inside `spliterator` could perform a potentially expensive iteration twice. Everything that extends `ArchiveFileSet` will reread the full archive twice, for example, as would happen for everything that extends `BaseResourceCollectionContainer` if caching is disabled.
   
   It is probably better to use your initial PR. We could created sized iterators for some of the collections, but it is not safe in as many places as I thought it would be.
   
   Sorry for the additional effort I have caused.


-- 
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.