Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040152Openbravo ERPA. Platformpublic2019-02-05 18:122019-03-28 14:56
immediateminorhave not tried
Pre packaging ( pi )
pi [^]
0040152: export.database is slower after defining it as a forked task
The fix for issue 0040047 set the export.database as a forked task. After introducing this change this task has become slower.

This is caused because now a different XML parser is used for reading the XML files that define the database model. (See attached images of the export.database profiling before and after the fix).

Note that the current XML parser factory implementation is org.apache.xerces.jaxp.SAXParserFactoryImpl which is present in the classpath because of the xercesImpl.jar[1]

[1] [^]
Prepare two clean environments:

  a) revision: 35384
  b) revision: 35385 [1]

1) In both environments, set all modules in "in development" status and run ant export.database.
2) Check the time spent for the task is higher in environment "b".

[1] [^]
Use the same SAXParserFactory[1] that was being used before issue 0040047. There are two possible solutions:

a) Exclude xercesImpl.jar from the classpath used by the task
b) Define a system property in the task to explicitly force the use of the SAXParserFactory implementation being used before:

  <sysproperty key="javax.xml.parsers.SAXParserFactory" value="" />

[1] [^]
No tags attached.
caused by defect 0040047 closed caristu Fix database export to avoid manually copying wstx-asl-3.0.2.jar inside Ant folder 
related to defect 0040163 closed caristu Do not use xercesImpl XML parser factory in task 
png before40047.png (123,234) 2019-02-05 18:15

png after40047.png (125,054) 2019-02-05 18:15
Issue History
2019-02-05 18:12caristuNew Issue
2019-02-05 18:12caristuAssigned To => caristu
2019-02-05 18:12caristuModules => Core
2019-02-05 18:12caristuTriggers an Emergency Pack => No
2019-02-05 18:15caristuFile Added: before40047.png
2019-02-05 18:15caristuFile Added: after40047.png
2019-02-05 18:16caristuRelationship addedcaused by 0040047
2019-02-05 18:16caristuRegression level => Pre packaging ( pi )
2019-02-05 18:16caristuRegression date => 2019-01-31
2019-02-05 18:16caristuRegression introduced in release => pi
2019-02-05 18:16caristuRegression introduced by commit => [^]
2019-02-05 19:10caristuStatusnew => scheduled
2019-02-06 10:47caristuReview Assigned To => alostale
2019-02-06 12:31hgbotCheckin
2019-02-06 12:31hgbotNote Added: 0109626
2019-02-06 12:31hgbotStatusscheduled => resolved
2019-02-06 12:31hgbotResolutionopen => fixed
2019-02-06 12:31hgbotFixed in SCM revision => [^]
2019-02-06 16:10caristuIssue cloned0040163
2019-02-06 16:10caristuRelationship addedrelated to 0040163
2019-02-06 16:14caristuDescription Updatedbug_revision_view_page.php?rev_id=18284#r18284
2019-02-06 16:15caristuDescription Updatedbug_revision_view_page.php?rev_id=18285#r18285
2019-02-06 16:25caristuDescription Updatedbug_revision_view_page.php?rev_id=18290#r18290
2019-02-06 16:25caristuProposed Solution updated
2019-02-11 14:13alostaleNote Added: 0109669
2019-02-11 14:13alostaleStatusresolved => closed
2019-02-11 14:13alostaleFixed in Version => 3.0PR19Q2
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110800

2019-02-06 12:31   
Repository: erp/devel/pi
Changeset: 26f426646dc81e7839700507dec84ad5f3931dc0
Author: Carlos Aristu <carlos.aristu <at>>
Date: Wed Feb 06 12:21:20 2019 +0100
URL: [^]

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] [^]

M src-db/database/build.xml
2019-02-11 14:13   
reviewed + tested
2019-03-28 14:56   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test