Author: olga
Date: Thu May 29 17:38:33 2008
New Revision: 661539

URL: http://svn.apache.org/viewvc?rev=661539&view=rev
Log:
PIG-85: memory optimization

Modified:
    incubator/pig/trunk/CHANGES.txt
    incubator/pig/trunk/src/org/apache/pig/data/Tuple.java

Modified: incubator/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=661539&r1=661538&r2=661539&view=diff
==============================================================================
--- incubator/pig/trunk/CHANGES.txt (original)
+++ incubator/pig/trunk/CHANGES.txt Thu May 29 17:38:33 2008
@@ -304,3 +304,5 @@
 
     PIG-250: re-enabling speculative execution and fixing the failure
 
+    PIG-85: memory optimization
+

Modified: incubator/pig/trunk/src/org/apache/pig/data/Tuple.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/data/Tuple.java?rev=661539&r1=661538&r2=661539&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/data/Tuple.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/data/Tuple.java Thu May 29 17:38:33 
2008
@@ -35,6 +35,7 @@
 public class Tuple extends Datum implements WritableComparable {
     
     private static final Log log = LogFactory.getLog(Tuple.class);
+    private static int numFields = 5;
     
     protected ArrayList<Datum> fields;
     static String              defaultDelimiter = "[,\t]";
@@ -77,7 +78,7 @@
             delimiter = defaultDelimiter;
         }
         
-        fields = new ArrayList<Datum>() ;
+        fields = new ArrayList<Datum>(numFields) ;
         int delimSize = delimiter.length() ;
         boolean done = false ;
         
@@ -96,6 +97,8 @@
                 done = true ;
             }
         }
+
+        numFields = fields.size();
     }
 
     /**


Reply via email to