Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040152
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2019-02-05 18:122019-03-28 14:56
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityimmediateResolutionfixedFixed in Version3.0PR19Q2
StatusclosedFix in branchFixed in SCM revision26f426646dc8
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression levelPre packaging ( pi )
Regression date2019-01-31
Regression introduced in releasepi
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/aaa984886667a027a8c99692447febe6e4ca7707 [^]
Triggers an Emergency PackNo
Summary

0040152: export.database is slower after defining it as a forked task

DescriptionThe 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] https://code.openbravo.com/erp/devel/pi/file/tip/lib/runtime/xercesImpl.jar [^]
Steps To ReproducePrepare 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] https://code.openbravo.com/erp/devel/pi/rev/aaa984886667a027a8c99692447febe6e4ca7707 [^]
Proposed SolutionUse 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="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" />

[1] https://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance-- [^]
TagsNo tags attached.
Attached Filespng file icon before40047.png [^] (123,234 bytes) 2019-02-05 18:15


png file icon after40047.png [^] (125,054 bytes) 2019-02-05 18:15

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0040047 closedcaristu Fix database export to avoid manually copying wstx-asl-3.0.2.jar inside Ant folder 
related to defect 0040163 closedcaristu Do not use xercesImpl XML parser factory in update.database.java task 

-  Notes
(0109626)
hgbot (developer)
2019-02-06 12:31

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

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

---
M src-db/database/build.xml
---
(0109669)
alostale (manager)
2019-02-11 14:13

reviewed + tested
(0110800)
hudsonbot (developer)
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: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2019-02-05 18:12 caristu New Issue
2019-02-05 18:12 caristu Assigned To => caristu
2019-02-05 18:12 caristu Modules => Core
2019-02-05 18:12 caristu Triggers an Emergency Pack => No
2019-02-05 18:15 caristu File Added: before40047.png
2019-02-05 18:15 caristu File Added: after40047.png
2019-02-05 18:16 caristu Relationship added caused by 0040047
2019-02-05 18:16 caristu Regression level => Pre packaging ( pi )
2019-02-05 18:16 caristu Regression date => 2019-01-31
2019-02-05 18:16 caristu Regression introduced in release => pi
2019-02-05 18:16 caristu Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/aaa984886667a027a8c99692447febe6e4ca7707 [^]
2019-02-05 19:10 caristu Status new => scheduled
2019-02-06 10:47 caristu Review Assigned To => alostale
2019-02-06 12:31 hgbot Checkin
2019-02-06 12:31 hgbot Note Added: 0109626
2019-02-06 12:31 hgbot Status scheduled => resolved
2019-02-06 12:31 hgbot Resolution open => fixed
2019-02-06 12:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/26f426646dc81e7839700507dec84ad5f3931dc0 [^]
2019-02-06 16:10 caristu Issue cloned 0040163
2019-02-06 16:10 caristu Relationship added related to 0040163
2019-02-06 16:14 caristu Description Updated View Revisions
2019-02-06 16:15 caristu Description Updated View Revisions
2019-02-06 16:25 caristu Description Updated View Revisions
2019-02-06 16:25 caristu Proposed Solution updated
2019-02-11 14:13 alostale Note Added: 0109669
2019-02-11 14:13 alostale Status resolved => closed
2019-02-11 14:13 alostale Fixed in Version => 3.0PR19Q2
2019-03-28 14:56 hudsonbot Checkin
2019-03-28 14:56 hudsonbot Note Added: 0110800


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker