You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/04/21 18:28:25 UTC

[jira] [Commented] (GROOVY-7822) CLONE - Redundant computation in ObservableSet

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

ASF GitHub Bot commented on GROOVY-7822:
----------------------------------------

GitHub user jwagenleitner opened a pull request:

    https://github.com/apache/groovy/pull/316

    GROOVY-7822 - Redundant computation in ObservableSet

    Related to PR #314, performance significantly improved for `retainAll`, similar change to `removeAll` did not yield any significant performance difference.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jwagenleitner/groovy GROOVY-7822-ObservableSet

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/316.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #316
    
----
commit 459a141bf4f558e3340c8df3c125b540a49fa9d4
Author: John Wagenleitner <jw...@apache.org>
Date:   2016-04-21T16:17:46Z

    GROOVY-7822 - Redundant computation in ObservableSet

----


> 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)