[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: optimizing memory consumption with XMLBeans
From:       "Cezar Andrei" <cezar () bea ! com>
Date:       2006-03-22 15:29:30
Message-ID: 99479F4D39C9244F8E17E688193A3DD85AA4A7 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

Mario,

 

XMLBeans works with an in-memory xml store, it loads and saves the data
to and from streaming API's like SAX, STAX but the entire document will
be stored in memory. To avoid this, one can handle the stream and load
only small parts that fit in memory, one at a time. 

 

This isn't a usual scenario for XMLBeans right now, but we think this
would be a useful feature to add. 

 

If anybody is interested to look into it, he should consider using
XMLStreamReaderExt (which provides java typed data) and
ValidatingInfoXMLStreamReader (which provides schema related info).

 

Cezar

 

 

________________________________

From: Mario Rodriguez [mailto:rvillane@gmail.com] 
Sent: Tuesday, March 21, 2006 5:21 PM
To: user@xmlbeans.apache.org
Subject: Re: optimizing memory consumption with XMLBeans

 

I see, and XMLBeans implementation supports sTax ? for very fast
processing and light memory usage 

On 3/21/06, Radu Preotiuc-Pietro < radup@bea.com <mailto:radup@bea.com>
> wrote:

Not sure what you are asking. On one hand, XmlBeans is indeed by default
using SAX to interface with the XML parser, but on the other, XmlBeans
is an in-memory XML processing tool, so if you need to process a huge
XML file, you would need a huge amount of (virtual) memory to do it.

 

Radu

 

________________________________

From: Mario Rodriguez [mailto:rvillane@gmail.com] 
Sent: Monday, March 20, 2006 12:12 PM
To: user@xmlbeans.apache.org
Subject: optimizing memory consumption with XMLBeans

Hi people, there is any way to configure XMLBeans to use SAX in order to
feed business objects generated by the scomp tool ?  What a I need is to
optimize  memory consumption because I'm feeding XML beans with huge XML
files 

thanks


-- 
Mario Rodriguez 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;}
p
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman";}
pre
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle21
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Mario,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>XMLBeans works with an in-memory xml
store, it loads and saves the data to and from streaming API&#8217;s like SAX,
STAX but the entire document will be stored in memory. To avoid this, one can
handle the stream and load only small parts that fit in memory, one at a time. \
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This isn&#8217;t a usual scenario for
XMLBeans right now, but we think this would be a useful feature to add. \
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If anybody is interested to look into it,
he should consider using XMLStreamReaderExt (which provides java typed data) and
ValidatingInfoXMLStreamReader (which provides schema related \
info).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Cezar<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Mario Rodriguez
[mailto:rvillane@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, March 21, 2006 5:21
PM<br>
<b><span style='font-weight:bold'>To:</span></b> user@xmlbeans.apache.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: optimizing memory
consumption with XMLBeans</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>I see, and XMLBeans
implementation supports sTax ? for very fast processing and light memory usage \
<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 3/21/06, <b><span style='font-weight:bold'>Radu
Preotiuc-Pietro</span></b> &lt;<a href="mailto:radup@bea.com"> radup@bea.com</a>&gt;
wrote:</span></font></span><o:p></o:p></p>

<div>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Not sure what you are asking. On one hand,
XmlBeans is indeed by default using SAX to interface with the XML parser, but
on the other, XmlBeans is an in-memory XML processing tool, so if you need to
process a huge XML file, you would need a huge amount of (virtual) memory to do
it.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Radu</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Mario
Rodriguez [mailto:<a href="mailto:rvillane@gmail.com" \
target="_blank">rvillane@gmail.com</a>] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, March 20, 2006 12:12
PM<br>
<b><span style='font-weight:bold'>To:</span></b> <a
href="mailto:user@xmlbeans.apache.org" \
target="_blank">user@xmlbeans.apache.org</a><br> <b><span \
style='font-weight:bold'>Subject:</span></b> optimizing memory consumption with \
XMLBeans</span></font><o:p></o:p></p>

</div>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hi
people, there is any way to configure XMLBeans to use SAX in order to feed
business objects generated by the scomp tool ?&nbsp; What a I need is to
optimize&nbsp;&nbsp;memory consumption because I'm feeding XML beans with huge
XML files <o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>thanks<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
-- <br>
Mario Rodriguez <o:p></o:p></span></font></p>

</div>

</div>

</div>

</div>

</div>

</body>

</html>
<PRE>_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
</PRE>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic