[hg] releases: performance: create list with fixed entries of lo...

  • From: Alexander Simon < >
  • To:
  • Subject: [hg] releases: performance: create list with fixed entries of lo...
  • Date: Wed, 19 Dec 2012 04:08:56 -0800

changeset 06840c341756 in releases ((none))
details: http://hg.netbeans.org/releases/rev/06840c341756
description:
        performance: create list with fixed entries of lookup result (yourkit 
show 5% time on iterator on mozilla sources parsing)

diffstat:

 dlight.remote/src/org/netbeans/modules/remote/spi/FileSystemProvider.java |  
7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (24 lines):

diff --git 
a/dlight.remote/src/org/netbeans/modules/remote/spi/FileSystemProvider.java 
b/dlight.remote/src/org/netbeans/modules/remote/spi/FileSystemProvider.java
--- 
a/dlight.remote/src/org/netbeans/modules/remote/spi/FileSystemProvider.java
+++ 
b/dlight.remote/src/org/netbeans/modules/remote/spi/FileSystemProvider.java
@@ -44,6 +44,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.logging.Level;
 import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
@@ -70,9 +71,9 @@
         void problemOccurred(FileSystem fileSystem, String path);
         void recovered(FileSystem fileSystem);
     }
-    
-    private static final  Collection<? extends 
FileSystemProviderImplementation> ALL_PROVIDERS =
-            
Lookup.getDefault().lookupAll(FileSystemProviderImplementation.class);
+    // create own copy of lookup to avoid performance issues in 
ProxyLookup.LazyCollection.iterator()
+    private static final  Collection<FileSystemProviderImplementation> 
ALL_PROVIDERS =
+            new 
ArrayList<FileSystemProviderImplementation>(Lookup.getDefault().lookupAll(FileSystemProviderImplementation.class));
 
     private FileSystemProvider() {
     }

[hg] releases: performance: create list with fixed entries of lo...

Alexander Simon 12/19/2012

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close