fixes bug 40152: export.database is slower after defining it as a forked task
authorCarlos Aristu <carlos.aristu@openbravo.com>
Wed, 06 Feb 2019 12:21:20 +0100
changeset 35433 26f426646dc8
parent 35432 9bc663af3896
child 35434 7d0e61ec4405
fixes bug 40152: export.database is slower after defining it as a forked task

The changeset[1] was unintentionally changing the XML parser used by the export tasks. This is because as now they are forked tasks, they make use of their own classpath which includes the xercesImpl library that provides the XML parser that was started to be used after the mentioned changeset.

We are now setting the javax.xml.parsers.SAXParserFactory system property in order to explicitly set the same XML parser which was being used before because it seems that provides better performance during the XML parsing.

[1] https://code.openbravo.com/erp/devel/pi/rev/aaa984886667a027a8c99692447febe6e4ca7707
src-db/database/build.xml
--- a/src-db/database/build.xml	Tue Feb 05 15:33:59 2019 +0100
+++ b/src-db/database/build.xml	Wed Feb 06 12:21:20 2019 +0100
@@ -135,6 +135,7 @@
       <syspropertyset>
          <propertyref name="java.security.egd" />
       </syspropertyset>
+      <sysproperty key="javax.xml.parsers.SAXParserFactory" value="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" />
     </java>
     <antcall target="update.dbupdate.timestamp" />
   </target>
@@ -155,6 +156,7 @@
       <syspropertyset>
          <propertyref name="java.security.egd" />
       </syspropertyset>
+      <sysproperty key="javax.xml.parsers.SAXParserFactory" value="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" />
     </java>
   </target>