commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "E P (Jira)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-722) IteratorUtils.chainedIterator() Performance Degrades
Date Fri, 01 Nov 2019 22:18:00 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16965124#comment-16965124
] 

E P commented on COLLECTIONS-722:
---------------------------------

Hey [~Guoping1],

 

Your example shows one way to use the IteratorChain more efficiently.

I am no longer using the API.  The issue for me is that tried to use the API via the IteratorUtils
chainedIterator method, which returns an Iterator.   Since it returns an iterator, my natural
inclination was to chain that iterator with any future iterators.  I'm sure the IteratorUtils
can be updated to work as expected.   If it cannot for some reason, then the javadocs should
be updated to indicate the correct way to use the API.  At least that is how I would handle
it.

> IteratorUtils.chainedIterator() Performance Degrades
> ----------------------------------------------------
>
>                 Key: COLLECTIONS-722
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-722
>             Project: Commons Collections
>          Issue Type: Bug
>    Affects Versions: 4.1
>            Reporter: E P
>            Priority: Major
>         Attachments: IteratorUtilsTest.java
>
>
> IteratorUtils.chainedIterator() performance degrades when chaining iterators with chained
iterators.   The slowdown appears to be exponential, based upon the number of chains created. 
The attached test shows the issue.  
> As a reference, the same test below works as expected using Google's Guava Iterator.concat()
functionality.   It is possible I am misusing the API, but the javadoc did not indicate
as much.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message