Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
EMLParser is slow to process large EML documents #1
To try to alleviate this, change the parser to use a SAX-based model rather than a DOM.
See the attached file as an example.
Tested the validator against the 4.3MB
$ time java -cp $CP $pkg/EMLValidator src/test/resources/eml250.xml isValid: true real 0m1.013s user 0m2.627s sys 0m0.149s $ time java -cp $CP $pkg/EMLValidator src/test/resources/invalidEML/eml-error-annot-missing-id.xml isValid: false real 0m0.312s user 0m0.405s sys 0m0.046s $ time java -cp $CP $pkg/EMLValidator src/test/resources/eml-sample.xml isValid: true real 0m0.337s user 0m0.508s sys 0m0.046s