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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036755
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-08-31 10:312017-09-21 16:49
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisionf8c3d0a4f7a4
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036755: inefficient translate task

DescriptionTranslate task which looks in html, jrxml, srpt and fo files for labels that can be translated and updates ad_textinterfaces table is quite inefficient:

* It gets invoked 8 times (once for core and one for modules per each file extension), in case there is no module in development this task does nothing, but it performs the check 8 times.
* Performs the whole checks once per installed language (this is because long time ago this task generated translated files for each language installed).
* Executes updates with no change whenever a label is found to be in use
* All DB operations are performed in auto-commit mode adding an important overhead
* log is too verbose
Steps To Reproduce1. With no modules in development
1.1. Execute ant translate (see eg. [1])
  -> it can take 5-10 seconds to check there is no module in development to finally not perform any operation, this is worse if the number of modules is bigger (ie. with 200 modules takes ~1min)

2. With all modules in developemnt
2.1 Execute ant translate (see eg. [2])
  -> it can take 40s-2min

---
[1] https://ci.openbravo.com/job/int-full-pgsql/3198/console [^]
[2] https://ci.openbravo.com/job/int-dbcons-pgsql/2994/console [^]
Proposed SolutionImprove all the topics described above.

With these changes in place, the improvement is:

1. With no modules in development, time is highly reduced to few ms (see eg. [3])
2. With all modules in development, time is reduced to ~2-3 sec (see eg. [4])

---
[3] https://ci.openbravo.com/view/try/job/try-full-pgsql/6270/console [^]
[4] https://ci.openbravo.com/view/try/job/try-dbcons-oracle/5669/console [^]
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0036824 closedalostale false DB modified positive detected after compile.complete 

-  Notes
(0098746)
hgbot (developer)
2017-08-31 10:55

Repository: erp/devel/pi
Changeset: f8c3d0a4f7a47808cd21001bc5c258a98214dfbd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Aug 11 16:21:42 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f8c3d0a4f7a47808cd21001bc5c258a98214dfbd [^]

fixed bug 36755: inefficient translate task

  Several improvements applied:
    * A single invocation is performed instead one per file extension.
    * Look for labels just once regardless number of installed translations.
    * Cache all labels in memory so that a single query is performed to look for
      them up instead of one per each label found in files.
    * Execute all DB updates in a single transaction
    * Reduced log vebosity (specially when no modules in development)

---
M build.xml
M src-trl/src/org/openbravo/translate/Translate.java
M src-trl/src/org/openbravo/translate/Translate_data.xsql
M src/build.xml
---
(0098778)
hgbot (developer)
2017-09-01 13:24

Repository: erp/devel/pi
Changeset: 62f82f265b39a26266fd01879f7b1b820f3e0f61
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Sep 01 13:23:45 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/62f82f265b39a26266fd01879f7b1b820f3e0f61 [^]

related to issue 36755: avoid nested if

---
M src-trl/src/org/openbravo/translate/Translate.java
---
(0098779)
caristu (developer)
2017-09-01 13:25

Code reviewed + tested OK.
(0099349)
hudsonbot (developer)
2017-09-21 16:49

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/9750b78d3e5c [^]
Maturity status: Test
(0099351)
hudsonbot (developer)
2017-09-21 16:49

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/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-08-31 10:31 alostale New Issue
2017-08-31 10:31 alostale Assigned To => platform
2017-08-31 10:31 alostale Modules => Core
2017-08-31 10:31 alostale Triggers an Emergency Pack => No
2017-08-31 10:31 alostale Assigned To platform => alostale
2017-08-31 10:31 alostale Tag Attached: Performance
2017-08-31 10:31 alostale Review Assigned To => caristu
2017-08-31 10:55 hgbot Checkin
2017-08-31 10:55 hgbot Note Added: 0098746
2017-08-31 10:55 hgbot Status new => resolved
2017-08-31 10:55 hgbot Resolution open => fixed
2017-08-31 10:55 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f8c3d0a4f7a47808cd21001bc5c258a98214dfbd [^]
2017-08-31 13:06 shuehner Issue Monitored: shuehner
2017-09-01 13:24 hgbot Checkin
2017-09-01 13:24 hgbot Note Added: 0098778
2017-09-01 13:25 caristu Note Added: 0098779
2017-09-01 13:25 caristu Status resolved => closed
2017-09-01 13:25 caristu Fixed in Version => 3.0PR17Q4
2017-09-11 14:35 alostale Relationship added causes 0036824
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099349
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099351


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker