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 bu...@apache.org on 2001/03/08 08:27:47 UTC

[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.