groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wagenleitner (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-7822) CLONE - Redundant computation in ObservableSet
Date Thu, 21 Apr 2016 02:30:25 GMT
John Wagenleitner created GROOVY-7822:
-----------------------------------------

             Summary: CLONE - Redundant computation in ObservableSet
                 Key: GROOVY-7822
                 URL: https://issues.apache.org/jira/browse/GROOVY-7822
             Project: Groovy
          Issue Type: Bug
          Components: groovy-runtime
    Affects Versions: 2.4.6
            Reporter: John Wagenleitner


There appears to be redundant computaions in "ObservableList.retainAll"
methods in version 2.4.6. I have attached a test and proposed a small 
patch which ensures that "contains" method is called on hashset of
input collection. This patch gives 1739X speed up on my 
machine for the provided test. 

Also, one more possibility to fix the issue is by using TreeSet as suggested in 
https://issues.apache.org/jira/browse/GROOVY-5739 as well. 
Similar patches can be applied for three other methods, ObservableList.removeAll, ObservableSet.retainAll,
ObservableSet.removeAll.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message