axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-942) addTextNode() and getValue() extremely slow when Xerces is used as the XML parser
Date Mon, 04 Oct 2004 13:47:32 GMT
The following comment has been added to this issue:

     Author: Davanum Srinivas
    Created: Mon, 4 Oct 2004 6:47 AM
       Body:
Are u using 1.2RC1???? 

thanks,
dims
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-942?page=comments#action_53669

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-942

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-942
    Summary: addTextNode() and getValue() extremely slow when Xerces is used as the XML parser
       Type: Bug

     Status: Open

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.1rc2

   Assignee: Axis Developers Mailing List
   Reporter: Jin Siong Voon

    Created: Fri, 4 Jul 2003 1:35 AM
    Updated: Mon, 4 Oct 2004 6:47 AM
Environment: Operating System: Windows XP
Platform: PC

Description:
Hi,

I am using reading and writing SOAP messages using the Axis API and found that 
if I've set Xerces (2.4.0) as my XML parser, these calls consume a LOT of time.

1) addTextNode() method in the org.apache.axis.message.MessageElement class is 
very slow.  Did more digging, and the problem code is in the 
org.apache.axis.message.Text class where it creates a new org.w3c.dom.Document 
(and DocumentBuilder) every single time addTextNode() is called.  For some 
reason, creating a new Document and DocumentBuilder in Xerces is slower 
compared to Crimson (Crimson is the default for Sun JDK1.4.x), and without 
caching of some sort, this just make the whole exercise of adding text node to 
an element unacceptably slow.  Tried it with Crimson as the parser, and it was 
very fast!

2) getValue() method in the org.apache.axis.message.MessageElement class is 
very slow.  This problem is very similar to the one in (1) above, in the sense 
that a new Document (and hence DocumentBuilder) is created each time getValue
() is called.  The problem code is in getAsDocument() in MessageElement.  
Again, tried it with Crimson, and it was very fast!

Xerces has somehow put more penalty for creating DocumentBuilder and Document, 
so Axis might want to think of caching them for reuse and speed up things.  
This bug is quite critical, as it really slows down our application, and we 
have to put a pretty ugly hack to get around it (and yes, we have to use 
Xerces 2.4 onwards for our application).


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message