logo       

[jira] Issue Comment Edited: (XERCESJ-1268) parsing bix XMLs take very long: msg#00008

Subject: [jira] Issue Comment Edited: (XERCESJ-1268) parsing bix XMLs take very long time. A JAXRPC webservice request of soap size 2MB takes above 5 mins to complete parsing and start processing web service.
    [ 
https://issues.apache.org/jira/browse/XERCESJ-1268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527218
 ] 

mrglavas@xxxxxxxxxx edited comment on XERCESJ-1268 at 9/13/07 12:02 PM:
-------------------------------------------------------------------------

The application you've described here is using the DOM API inefficiently.  A 
Text node is not a StringBuffer.  The result of calling appendData() is a new 
string value for the Node so it's not surprising that it's slow if you keep 
calling it in this way.  Text should be accumulated in a real buffer before 
setting it on the Text node.  Your improvement request should be re-directed to 
whichever application is using the DOM in this way. We can't change the API.

      was (Author: mrglavas@xxxxxxxxxx):
    The application you've described here is using the DOM API inefficiently.  
A Text node is not a StringBuffer.  The result of calling appendData() is a new 
string value for the Node so it's not surprising that it's slow if you keep 
calling it in this way.  Text should be accumulated in real buffer before 
setting it on the Text node.  Your improvement request should be re-directed to 
whichever application is using the DOM in this way. We can't change the API.
  
> parsing bix XMLs take very long time. A JAXRPC webservice request of soap 
> size 2MB takes above 5 mins to complete parsing and start processing web 
> service.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1268
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1268
>             Project: Xerces2-J
>          Issue Type: Improvement
>          Components: DOM (Level 3 Core)
>         Environment: Operating System: All
> Platform: All 
>            Reporter: SHEREEF ABDULLA
>         Attachments: JaxRPCProcessRequest.java, WrkingBigSOAP.txt
>
>
> parsing bix XMLs take very long time. A JAXRPC webservice request of soap 
> size 2MB takes above 5 mins to complete parsing and start processing web 
> service.
> Observed that the SOAP messages are read line by line and 
> CharacterDataImpl.append() is getting called for each line. This appends each 
> line to the string data which stores the previously read xml part. This call 
> results in many string additions (say 20000+ for 1MB SOAP) of big string and 
> the thread is most of the time blocked in StringBuilder.expandcapacity due to 
> long string additions. 
> JAX RPC webservice with SOAP messages bigger than 1MB take 5 mins and more 
> just for the web service implementation to start working as the jaxrpc does a 
> SOAPMessage.getenvelop call to do HandlerChainImpl.checkMustUnderstand() 
> checking for the request message header.  Same problem happens for response 
> also. for time being we commented checkMustUnderstand method so that the 
> parsing doesn't happen at all.
> String additions for each of the lines would have been avoided, either by 
> creating the whole data single time or using string buffer instead of string. 
> I tried to modify the data field to use StringBuffer instead of String but 
> the underlying CoreDocumentImpl.modifiedCharacterData() and all underlying 
> calls takes the string params so couldn't go ahead with it.
> bug # XERCESJ-102 looks like the same issue..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe