Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0036755 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-08-31 10:31 | 2017-09-21 16:49 | |||
| Reporter | alostale | View Status | public | |||||
| Assigned To | alostale | |||||||
| Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q4 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | f8c3d0a4f7a4 | ||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | SCM revision | |||||||
| Merge Request Status | ||||||||
| Review Assigned To | caristu | |||||||
| OBNetwork customer | No | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | ||||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0036755: inefficient translate task | |||||||
| Description | Translate 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 Reproduce | 1. 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 Solution | Improve 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 [^] | |||||||
| Tags | Performance | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||
|
||||||||
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 (viewer) 2017-09-01 13:25 |
Code reviewed + tested OK. |
|
(0099349) hudsonbot (viewer) 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 (viewer) 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 | OBNetwork customer | => No |
| 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 |