Author: mrglavas Date: Mon Aug 8 19:28:47 2011 New Revision: 1155067 URL: http://svn.apache.org/viewvc?rev=1155067&view=rev Log: Memory usage improvement. The fBuckets field in the base class isn't used so make the array as small as possible.
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SoftReferenceSymbolTable.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SoftReferenceSymbolTable.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SoftReferenceSymbolTable.java?rev=1155067&r1=1155066&r2=1155067&view=diff ============================================================================== --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SoftReferenceSymbolTable.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SoftReferenceSymbolTable.java Mon Aug 8 19:28:47 2011 @@ -65,9 +65,12 @@ public class SoftReferenceSymbolTable ex */ public SoftReferenceSymbolTable(int initialCapacity, float loadFactor) { /* - * Not calling super() because we don't want to initialize the Entry buckets - * used by the base class. + * The Entry buckets in the base class are not used by this class. + * We call super() with 1 as the initial capacity to minimize the + * memory used by the field in the base class. */ + super(1, loadFactor); + if (initialCapacity < 0) { throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org