mkwan       2002/12/04 12:35:46

  Modified:    java/src/org/apache/xalan/processor
                        TransformerFactoryImpl.java
  Log:
  Performance fix
  
  Move the call to newTemplateHandler() to be after DOMSource processing.
  DOMSource creates another template handler in the processFromNode() method.
  The newTemplateHandler() call initializes the schema, which is expensive.
  
  Revision  Changes    Path
  1.45      +3 -3      
xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- TransformerFactoryImpl.java       1 Nov 2002 16:28:29 -0000       1.44
  +++ TransformerFactoryImpl.java       4 Dec 2002 20:35:44 -0000       1.45
  @@ -860,7 +860,6 @@
             throws TransformerConfigurationException
     {
   
  -    TemplatesHandler builder = newTemplatesHandler();
       String baseID = source.getSystemId();
   
       if (null == baseID)
  @@ -888,8 +887,6 @@
         baseID = SystemIDResolver.getAbsoluteURI(baseID);
       }
   
  -    builder.setSystemId(baseID);
  -
       if (source instanceof DOMSource)
       {
         DOMSource dsource = (DOMSource) source;
  @@ -906,6 +903,9 @@
         }
       }
   
  +    TemplatesHandler builder = newTemplatesHandler();
  +    builder.setSystemId(baseID);
  +    
       try
       {
         InputSource isource = SAXSource.sourceToInputSource(source);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to