Author: ruschein
Date: 2011-08-23 09:43:55 -0700 (Tue, 23 Aug 2011)
New Revision: 26626

Modified:
   
core3/impl/trunk/io-impl/src/main/java/org/cytoscape/io/internal/read/sif/SIFNetworkReader.java
Log:
Small performance optimisation for large networks.

Modified: 
core3/impl/trunk/io-impl/src/main/java/org/cytoscape/io/internal/read/sif/SIFNetworkReader.java
===================================================================
--- 
core3/impl/trunk/io-impl/src/main/java/org/cytoscape/io/internal/read/sif/SIFNetworkReader.java
     2011-08-23 00:42:09 UTC (rev 26625)
+++ 
core3/impl/trunk/io-impl/src/main/java/org/cytoscape/io/internal/read/sif/SIFNetworkReader.java
     2011-08-23 16:43:55 UTC (rev 26626)
@@ -54,12 +54,12 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * Reader for graphs in the interactions file format. Given the filename,
  * provides the graph and attributes objects constructed from the file.
  */
 public class SIFNetworkReader extends AbstractNetworkReader {
-
        private static final Logger logger = 
LoggerFactory.getLogger(SIFNetworkReader.class);
 
        private static final String DEF_DELIMITER = "\\s+";
@@ -97,7 +97,7 @@
 
                String line;
                final BufferedReader br = new BufferedReader(new 
InputStreamReader(inputStream));
-               Map<String, CyNode> nMap = new HashMap<String, CyNode>();
+               Map<String, CyNode> nMap = new HashMap<String, CyNode>(10000);
 
                CyNetwork network = cyNetworkFactory.getInstance();
                final CyTable nodeTable = network.getDefaultNodeTable();

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to