You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/01/11 04:16:12 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/stree DocImpl.java DocumentFragmentImpl.java DocumentImpl.java SourceTreeHandler.java

sboag       01/01/10 19:16:12

  Modified:    java/src/org/apache/xalan/stree DocImpl.java
                        DocumentFragmentImpl.java DocumentImpl.java
                        SourceTreeHandler.java
  Log:
  Add way to control the size of the char buffer being created, and
  use only 1K for document fragments, which are used for result tree
  fragments.  This could effect performance of SAX transforms, which
  I think create document fragments also, so I should probably add control
  clear down to TransformerImple#transformToRTF.
  This is to address the note from thomas.maesing@bgs-ag.de,
  "Re: XalanJ2 outstanding issues?", 01/10/2001 02:57 AM,
  where he included a stylesheet with lots of RTFs created in variables.
  
  Revision  Changes    Path
  1.3       +13 -1     xml-xalan/java/src/org/apache/xalan/stree/DocImpl.java
  
  Index: DocImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/DocImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocImpl.java	2001/01/07 03:59:23	1.2
  +++ DocImpl.java	2001/01/11 03:16:11	1.3
  @@ -77,7 +77,7 @@
     /** This holds all the characters used, copied from the 
      * characters events.  This allows us to not have to allocate 
      * a million little arrays.  */
  -  FastStringBuffer m_chars = new FastStringBuffer(1024 * 8);
  +  FastStringBuffer m_chars;
     
     /** Contains exception thrown from transformation thread, 
      * if one occured. */
  @@ -89,8 +89,20 @@
     public DocImpl()
     {
       super(null);
  +    m_chars = new FastStringBuffer(1024 * 8);
       m_id = m_idCount++;
     }
  +  
  +  /**
  +   * Constructor DocImpl
  +   */
  +  public DocImpl(int charBufSize)
  +  {
  +    super(null);
  +    m_chars = new FastStringBuffer(charBufSize);
  +    m_id = m_idCount++;
  +  }
  +
   
     /** A reference back to the source tree 
      * handler that is creating this tree.    */
  
  
  
  1.9       +9 -0      xml-xalan/java/src/org/apache/xalan/stree/DocumentFragmentImpl.java
  
  Index: DocumentFragmentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/DocumentFragmentImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DocumentFragmentImpl.java	2000/12/31 09:48:47	1.8
  +++ DocumentFragmentImpl.java	2001/01/11 03:16:11	1.9
  @@ -76,6 +76,15 @@
   
       super();
     }
  +  
  +  /**
  +   * Constructor DocumentFragmentImpl
  +   */
  +  public DocumentFragmentImpl(int charBufSize)
  +  {
  +    super(charBufSize);
  +  }
  +
   
     /**
      * A short integer indicating what type of node this is. The named
  
  
  
  1.15      +10 -0     xml-xalan/java/src/org/apache/xalan/stree/DocumentImpl.java
  
  Index: DocumentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/DocumentImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DocumentImpl.java	2000/12/31 09:50:21	1.14
  +++ DocumentImpl.java	2001/01/11 03:16:11	1.15
  @@ -91,6 +91,16 @@
       setDoc(this);
       // m_bUpIndexer = new LevelIndexer();
     }
  +  
  +  /**
  +   * Constructor DocumentImpl
  +   */
  +  public DocumentImpl(int charBufSize)
  +  {
  +    super(charBufSize);
  +    setDoc(this);
  +  }
  +
   
     /**
      * Constructor DocumentImpl
  
  
  
  1.31      +1 -1      xml-xalan/java/src/org/apache/xalan/stree/SourceTreeHandler.java
  
  Index: SourceTreeHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/SourceTreeHandler.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- SourceTreeHandler.java	2001/01/09 22:35:48	1.30
  +++ SourceTreeHandler.java	2001/01/11 03:16:11	1.31
  @@ -133,7 +133,7 @@
       
       if(doFragment)
       {
  -      m_root = new DocumentFragmentImpl();
  +      m_root = new DocumentFragmentImpl(1024);
         m_docFrag = (DocumentFragmentImpl)m_root;
       }
       else