xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mk...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
Date Wed, 12 Mar 2003 20:17:40 GMT
mkwan       2003/03/12 12:17:40

  Modified:    java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM
                        MultiDOM.java
  Log:
  XSLTC_DTM performance work
  Save the DTMManager in a field in MultiDOM. Don't compute it
  everytime in MultiDOM.getDTMId().
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.16.10.17 +6 -5      xml-xalan/java/src/org/apache/xalan/xsltc/dom/MultiDOM.java
  
  Index: MultiDOM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/MultiDOM.java,v
  retrieving revision 1.16.10.16
  retrieving revision 1.16.10.17
  diff -u -r1.16.10.16 -r1.16.10.17
  --- MultiDOM.java	12 Mar 2003 17:44:12 -0000	1.16.10.16
  +++ MultiDOM.java	12 Mar 2003 20:17:39 -0000	1.16.10.17
  @@ -89,6 +89,7 @@
       private DOM[] _adapters;
       private int _free;
       private int _size;
  +    private XSLTCDTMManager _dtmManager;
   
       private Hashtable _documents = new Hashtable();
   
  @@ -280,7 +281,9 @@
           // %HZ% %REVISIT% encountered, and that method ends up returning the
           // %HZ% %REVISIT% mask of the main document, when what we really what
           // %HZ% %REVISIT% is to read the stylesheet itself!
  -        addDOMAdapter((DOMAdapter) main, false);
  +        DOMAdapter adapter = (DOMAdapter)main;
  +        addDOMAdapter(adapter, false);
  +        _dtmManager = (XSLTCDTMManager)((DTMDefaultBase)adapter.getDOMImpl()).m_mgr;
       }
   
       public int nextMask() {
  @@ -592,9 +595,7 @@
       
       public int getDTMId(int nodeHandle)
       {
  -        DTMManager dtmManager =
  -              ((DTMDefaultBase)((DOMAdapter)_adapters[0]).getDOMImpl()).m_mgr;
  -        int id = dtmManager.getDTMIdentity(dtmManager.getDTM(nodeHandle))
  +        int id = _dtmManager.getDTMIdentity(_dtmManager.getDTM(nodeHandle))
                          >>> DTMManager.IDENT_DTM_NODE_BITS;
           return (id == -1 ? 0 : id);
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message