Recently during performance testing we noticed that while saving an
XmlObject using the XmlObject.save() method call and using the
SavePrettyPrint option it caused the time to save the file from 2
seconds to over 90 seconds. Another strange behaviour was that this
delay didn't kick in until the file size we were trying to save was over
4MB. I removed the pretty print option and the time was back down to
around 2 seconds. We are using XmlBeans 2.0.0. Any reason why this is
adding on so much overhead ? And is there any other way of
accomplishing this (i.e. saving the output file with pretty print on).
Thanks,
Ian
String result = new String("Very large string......");
MyReportDocument reportDoc = MyReportDocument.Factory
.newInstance();
MyReport report = MyReport.Factory.parse(result.toString());
reportDoc.setAuditReport(report);
File tempFile = File.createTempFile("temp", "xml", "C:\\temp");
XmlOptions options = new XmlOptions();
options.setSaveAggressiveNamespaces();
options.setSavePrettyPrint();
report.save(tempFile, options);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]