mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-11 11:06:25 +00:00
Update XStream drive to improve performance in xml serilization/deserialization (#2561)
* Update XStream drive to improve performance in xml serilization/deserialization According XStream FAQ (http://x-stream.github.io/faq.html#Scalability): XStream is a generalizing library, it inspects and handles your types on the fly. Therefore it will normally be slower than a piece of optimized Java code generated out of a schema. However, it is possible to increase the performance anyway: * Write custom converters for those of your types that occur very often in your XML. * Keep a configured XStream instance for multiple usage. Creation and initialization is quite expensive compared to the overhead of XStream when calling marshall or unmarshal. * Use Xpp3 or StAX parsers. So, I decided to move from old Xpp to new Xpp3. * Change other occurance of XppDriver to Xpp3Driver as well
This commit is contained in:
1 parent
a04e2f9836
commit
8888296e68
3 files changed
+9
-9
No files matched your search
@@ -28,7 +28,7 @@ import com.thoughtworks.xstream.XStreamException;
|
||||
import com.thoughtworks.xstream.converters.Converter;
|
||||
import com.thoughtworks.xstream.converters.UnmarshallingContext;
|
||||
import com.thoughtworks.xstream.io.StreamException;
|
||||
import com.thoughtworks.xstream.io.xml.XppDriver;
|
||||
import com.thoughtworks.xstream.io.xml.Xpp3Driver;
|
||||
import hudson.diagnosis.OldDataMonitor;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.util.AtomicFileWriter;
|
||||
@@ -292,7 +292,7 @@ public final class XmlFile {
|
||||
|
||||
private static final SAXParserFactory JAXP = SAXParserFactory.newInstance();
|
||||
|
||||
private static final XppDriver DEFAULT_DRIVER = new XppDriver();
|
||||
private static final Xpp3Driver DEFAULT_DRIVER = new Xpp3Driver();
|
||||
|
||||
static {
|
||||
JAXP.setNamespaceAware(true);
|
||||
|
||||
Reference in new issue
Block a user