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.





