hit counter
   
 

Random ramblings of a paranoid git
"The question is not if you are paranoid, it is if you are paranoid enough."


All | Security | Work | Wine & Dine | Leisure

   
   
20040903 Friday September 03, 2004
DOM is a memory hog
Permalink | Comments [1] | 2004-09-03 10:41

I've been lazy and used a javax.xml.parsers.DocumentBuilder to get a DOM (Document Object Model) of the audit trail, and it turns out to be a real memory hog. Loading 17991 audit records (XML file was 7.7 MB) results in a Java VM of 304 MB (where 194 MB is the resident size of the process).

Not good!

I have audit trails millions of audit records.

This means that I'll probably have to use a SAX parser to parse the audit file.

   
 
Comments:

Hmm, might be worth looking into JAXB if you're doing stuff where you wish you had an in-memory view of an xml document, but can't afford to buy more RAM. Not sure if it'll stretch to millions though... Perhaps you'll need SAX after all.

Posted by Tim Foster on September 03, 2004 at 10:58 AM PDT #

Post a Comment:

Comments are closed for this entry.
   
XML
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today


Old entries


Bloggtoppen.se
OpenSolaris: Love at First Boot