[hg] main-silver: #227473 - org.netbeans.modules.editor.errorstr...

  • From: Milutin Kristofic < >
  • To: ,
  • Subject: [hg] main-silver: #227473 - org.netbeans.modules.editor.errorstr...
  • Date: Mon, 22 Apr 2013 15:46:13 -0700

changeset a95071dbc69e in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/a95071dbc69e
description:
        #227473 - 
org.netbeans.modules.editor.errorstripe.AnnotationViewDataImpl.propertyChange:
 LowPerformance took 6504 ms.

diffstat:

 
editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
 |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (19 lines):

diff --git 
a/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
 
b/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
--- 
a/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
+++ 
b/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationViewDataImpl.java
@@ -495,8 +495,13 @@
                     Collection<Mark> added = new LinkedHashSet<Mark>(nue);
                     Collection<Mark> removed = new LinkedHashSet<Mark>(old);
                     
-                    added.removeAll(old);
-                    removed.removeAll(nue);
+                    // own removeAll since indexof on HashSet is faster than 
on ArrayList and AbstractSet call indexof on smaller collection
+                    for (Iterator<Mark> old_it = old.iterator(); 
old_it.hasNext();) {
+                        added.remove(old_it.next());
+                    }
+                    for (Iterator<Mark> nue_it = nue.iterator(); 
nue_it.hasNext();) {
+                        removed.remove(nue_it.next());   
+                    }
                     
                     if (marksMap != null) {
                         for(Mark mark : removed) {

[hg] main-silver: #227473 - org.netbeans.modules.editor.errorstr...

Milutin Kristofic 04/22/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close