473,424 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,424 software developers and data experts.

Optimizing SAX CDATA handling

The setup: a Sax parser in a servlet and a Java client (same machine) which
uploads an XML document containing CDATA elements which hold base 64
encoded binary files. The servlet then SAX parses the client's data. If I
comment out the parser call I can see that the transmition time of large
data files is very low.

My understanding is that a SAX parser should transmit the content of a CDATA
string downstream without signiificant processing.

What I see:

If the CDATA sections are small (1KB or so) the Sax parser processes the
document around 20ms.

When the CDATA sections are large (totalling 1MB for example) parsing
becomes drastically slower, edging up towards 1000ms.

The only diffence between the two documents is the size of the CDATA.

I've tried several Sax implementations but the behaviour is the same.

How can I speed up parsing ? Is there a way have the parser's lexical
analyser perform fast copy-through processing on large CDATA sections? Is
there a buffering issue here?

A
Jul 20 '05 #1
0 2397

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: alainpoint | last post by:
I am experimenting with ElementTree and i came accross some (apparently) weird behaviour. I would expect a piece of XML to be read, parsed and written back without corruption (except for the...
8
by: Xah Lee | last post by:
what does it mean when a style tag gives something like the following? <style type="text/css" media="screen,projection">/*<!]>*/</style> is this standard? Xah xah@xahlee.org ∑...
1
by: mouli | last post by:
Hi all, i have an xml structure something like the given below one and i am facing problem in handling the contents inbetween CDATA, i mean the subtag '<inline-fig>' is printed as it is like this"...
0
by: noha | last post by:
HI everyone, anyone has an idea about how to access cdata in php, i am using php5.. here is the structure of my xml so you can have a clear idea <call-handling id="1" code="0" name="My...
3
by: Dilip | last post by:
I have been out of the XML world for a while and have sort of forgotten the exact difference between: <Symbol><!]></Symbol> and just: <Symbol>IBM</Symbol> Can anyone tell me why one is...
2
by: JohnAD | last post by:
Hello NG, I am getting some information from DB, and that data has mix html and XML tags in the content (e.g. detail on country). Basically CDATA types are mixed with regular string. Also,...
2
by: Spacen Jasset | last post by:
I've read the XML standard, and I wonder if someone can confirm this for me. Am I right in thinking that line endings are translated even within CDATA sections? The standard states that...
18
by: sim.sim | last post by:
Hi all. i'm faced to trouble using minidom: #i have a string (xml) within CDATA section, and the section includes "\r\n": iInStr = '<?xml version="1.0"?>\n<Data><!]></Data>\n' #After i...
9
by: shapper | last post by:
Hello, Why do some pages I have seen have //<![CDATA[ in the beginning of a script tag before the script itself? Do I need this? Thanks, Miguel
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.