Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043247Openbravo ERPA. Platformpublic2020-02-18 10:422022-04-21 15:48
shuehner 
alostale 
urgentminorhave not tried
closedfixed 
5
 
PR22Q3 
Core
No
0043247: Importing translation for table AD_ELEMENT_TRL takes huge amount of time (especially on oracle)
Importing a translation takes a long time for the AD_ELEMENT_TRL table.
Below is example output of a CI job importing french translation.
Times left are milliseconds.
On Postgres around 10s are needed to import 2660 rows
On Oracle around 5minutes are needed

PG
38679 importTrl - Updated=0 - from file AD_ALERTRULE_TRL_fr_FR.xml
47023 importTrl - Updated=2660 - from file AD_ELEMENT_TRL_fr_FR.xml

ORA
533789 importTrl - Updated=0 - from file AD_ALERTRULE_TRL_fr_FR.xml
886177 importTrl - Updated=2660 - from file AD_ELEMENT_TRL_fr_FR.xml

Especially in CI jobs having >1 translation pack as used by some customers that makes quick a big total slowdown of the oracle version:

Install.source total time:
PG: Total time: 5 minutes 35 seconds
ORA: Total time: 23 minutes 1 second

Likely cause is the trigger ad_element_trl_trg or obuiapp_element_trl_trg, obuisel_element_trl_trg as those are updating many other tables based on the newly imported/updated data.
install.source especially on oracle of i.e. french translation pack.
Probably can be reproduced easier by only importing a single xml translation file for AD_ELEMENT_TRL
Performance
related to defect 0032119 closed alostale Oracle: importing big sample data is very slow 
Issue History
2020-02-18 10:42shuehnerNew Issue
2020-02-18 10:42shuehnerAssigned To => platform
2020-02-18 10:42shuehnerModules => Core
2020-02-18 10:42shuehnerTriggers an Emergency Pack => No
2020-02-21 09:24alostaleSeveritymajor => minor
2020-02-21 09:24alostaleStatusnew => acknowledged
2020-02-21 09:24alostaleTag Attached: Performance
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base
2022-03-01 07:10alostalePrioritynormal => urgent
2022-03-02 10:48alostaleNote Added: 0135378
2022-03-02 10:48alostaleRelationship addedrelated to 0032119
2022-03-02 12:02hgbotNote Added: 0135382
2022-04-21 15:36hgbotResolutionopen => fixed
2022-04-21 15:36hgbotStatusacknowledged => closed
2022-04-21 15:36hgbotNote Added: 0136668
2022-04-21 15:36hgbotFixed in Version => PR22Q3
2022-04-21 15:36hgbotNote Added: 0136669
2022-04-21 15:48alostaleAssigned ToTriage Platform Base => alostale

Notes
(0135378)
alostale   
2022-03-02 10:48   
It can be reproduced during install.source only. Subsequent translation imports work faster:

install.source
importTrl - Updated=2785 - from file AD_ELEMENT_TRL_es_ES.xml - time: 339855ms

apply.module
importTrl - Updated=2785 - from file AD_ELEMENT_TRL_es_ES.xml - time: 2054ms
(0135382)
hgbot   
2022-03-02 12:02   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/535 [^]
(0136668)
hgbot   
2022-04-21 15:36   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/535 [^]
(0136669)
hgbot   
2022-04-21 15:36   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: ff16d4fee397f2c64d96b99e1ff5b779cedca66c
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 21-04-2022 15:26:21
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/ff16d4fee397f2c64d96b99e1ff5b779cedca66c [^]

fixes BUG-43247: slow translation import for AD_ELEMENT in Oracle

Importing translations in Oracle for AD_ELEMENT, specially during
install.source is very slow.

One of the biggest problem is, at this stage, DB statistics were
outdated, updating them before importing translations reduces
considerably the executiong time.
The statistics update is only done on oracle where the speedup is
considerable.

---
M src/org/openbravo/erpCommon/modules/ApplyModule.java
---