Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043098Openbravo ERPA. Platformpublic2020-02-03 12:182020-02-28 09:05
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
caristu
Core
No
0043098: Speed-up delete client (and related junit test) by only loading tables (and not full dbsm model)
SystemService.deleteClient needs to disable foreign keys, triggers and some constraints before the client deletion itself.

It currently used getModelFromDatabase(platform, true) to load the whole database model (including functions, triggers, views) & running pl standardization.

As the code needed only needs the table related things it should use getTablesFromDatabase instead skipping the extra items.

That removes around 20-30s of runtime of the delete client (& junit) test.
-
No tags attached.
diff 43098.diff (1,263) 2020-02-05 15:03
https://issues.openbravo.com/file_download.php?file_id=13973&type=bug
Issue History
2020-02-03 12:18shuehnerNew Issue
2020-02-03 12:18shuehnerAssigned To => platform
2020-02-03 12:18shuehnerModules => Core
2020-02-03 12:18shuehnerTriggers an Emergency Pack => No
2020-02-03 12:20shuehnerAssigned Toplatform => shuehner
2020-02-05 15:03shuehnerFile Added: 43098.diff
2020-02-28 09:04hgbotCheckin
2020-02-28 09:04hgbotNote Added: 0118195
2020-02-28 09:04hgbotStatusnew => resolved
2020-02-28 09:04hgbotResolutionopen => fixed
2020-02-28 09:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/46d6ad2346edc55b152504c8ae0a2929549dc106 [^]
2020-02-28 09:05caristuReview Assigned To => caristu
2020-02-28 09:05caristuStatusresolved => closed
2020-02-28 09:05caristuFixed in Version => 3.0PR20Q2
2020-02-28 09:05caristuNote Added: 0118196

Notes
(0118195)
hgbot   
2020-02-28 09:04   
Repository: erp/devel/pi
Changeset: 46d6ad2346edc55b152504c8ae0a2929549dc106
Author: Stefan Huehner <stefan.huehner <at> openbravo.com>
Date: Fri Feb 28 08:53:55 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/46d6ad2346edc55b152504c8ae0a2929549dc106 [^]

fixes BUG-43098: Speed-up delete client by only loading tables

  SystemService.deleteClient needs to disable foreign keys, triggers and some constraints before the client deletion itself.

  That method was using getModelFromDatabase(platform, true) to load the whole database model (including functions, triggers, views) and also it was running pl standardization.

  As the code needed only table related things it now use the new getTablesFromDatabase() method which just loads the table information skipping the extra items.

  This change removes around 20-30s of runtime of the delete client (& junit) test.

---
M src/org/openbravo/service/system/SystemService.java
---
(0118196)
caristu   
2020-02-28 09:05   
Reviewed