You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Shustef, Eugene" <Eu...@westgroup.com> on 2001/03/08 15:18:59 UTC

RE: [Bug 897] New - Memory leak reading large XML-files with SAX parser

I couldn't help, but notice that you are setting your parser validation to 
be true. Are you actually validating against a DTD? If so, do you
have anything declared in the DTD to be an ID type?

-----Original Message-----
From: bugzilla@apache.org [mailto:bugzilla@apache.org]
Sent: Thursday, March 08, 2001 2:28 AM
To: xerces-j-dev@xml.apache.org
Subject: [Bug 897] New - Memory leak reading large XML-files with SAX
parser


http://nagoya.apache.org/bugzilla/show_bug.cgi?id=897

*** shadow/897	Wed Mar  7 23:27:47 2001
--- shadow/897.tmp.18998	Wed Mar  7 23:27:47 2001
***************
*** 0 ****
--- 1,37 ----
+
+===========================================================================
=+
+ | Memory leak reading large XML-files with SAX parser
|
+
+---------------------------------------------------------------------------
-+
+ |        Bug #: 897                         Product: Xerces-J
|
+ |       Status: NEW                         Version: 1.3.0
|
+ |   Resolution:                            Platform: PC
|
+ |     Severity: Major                    OS/Version: Windows NT/2K
|
+ |     Priority:                           Component: SAX
|
+
+---------------------------------------------------------------------------
-+
+ |  Assigned To: xerces-j-dev@xml.apache.org
|
+ |  Reported By: t.blickle@ids-scheer.de
|
+
+---------------------------------------------------------------------------
-+
+ |          URL:
|
+
+===========================================================================
=+
+ |                              DESCRIPTION
|
+ I am using the validating SAX-Parser from Xerces as follows (Win NT SP5,
JDK 
+ 1.3):
+ 
+ SAXParser parser = new SAXParser();
+ parser.setFeature("http://xml.org/sax/features/validation",true);
+ parser.setFeature("http://xml.org/sax/features/namespaces",false);
+ parser.setDocumentHandler(handler);
+ parser.setEntityResolver(m_EntityResolver);
+ parser.setErrorHandler(m_errHandler);
+ 
+ InputStream in = new java.io.FileInputStream(currfilename);
+ parser.parse(new org.xml.sax.InputSource(in));
+ 
+ When I read large XML-files (25MB) the memory consuption keeps growing the

+ whole execution time of the programm. Using a memory profiles shows that
the in 
+ class org.apache.xerces.util.StringPool the variable fString[][] is
allocating 
+ approx 6*8192 Strings at the end of the programm run (Heap usage about
8MB).
+ 
+ This error occurs although a used the latest version 1.3.0. Using an older

+ version of Xerces the heap usage is even worse (about 50MB). 
+ 
+ I my application I expect XML files up to 100-300MB.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org