Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024919Openbravo ERP09. Financial managementpublic2013-10-09 19:382013-10-16 19:46
shuehner 
shuehner 
normalmajorhave not tried
closedfixed 
5
 
 
dmiguelez
Core
No
0024919: AccountingServer.checkDocuments is too slow and repeats same work multiple times
The BackgroundAccountingProcess is running checkDocumentsDates method for each client to find out if there are any documents in open periods to be posted.

That check is done for each docbasetype in a client. However docbasetype are defined on organization level. In practice (i.e. F&B) that means the same docbasetype code exists several times in a client so the check is unnecessarily repeated multiple times.
fresh install.source of pi on oracle (as there the queries involved are slower)
Instrument the selectDocumentsDates xsql method (or AcctServerData class) with info about docbasetype and notice that it gets called multiple times for the same docbasetype.
Add distinct to selectDocTypes method to only report every docbasetype once.
No tags attached.
related to defect 0024920 closed eduardo_Argal AcctServer.checkDocumentDates is very slow and is missing fix from issue 23420 
Issue History
2013-10-09 19:38shuehnerNew Issue
2013-10-09 19:38shuehnerAssigned To => shuehner
2013-10-09 19:38shuehnerModules => Core
2013-10-09 19:38shuehnerTriggers an Emergency Pack => No
2013-10-09 19:46hgbotCheckin
2013-10-09 19:46hgbotNote Added: 0061641
2013-10-09 19:46hgbotStatusnew => resolved
2013-10-09 19:46hgbotResolutionopen => fixed
2013-10-09 19:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1da36fb5ddbe739d316cd1a65088f3b4604dd265 [^]
2013-10-09 19:46hgbotCheckin
2013-10-09 19:46hgbotNote Added: 0061642
2013-10-09 19:47shuehnerReview Assigned To => dmiguelez
2013-10-09 19:58shuehnerRelationship addedrelated to 0024920
2013-10-10 10:22dmiguelezNote Added: 0061646
2013-10-10 10:22dmiguelezStatusresolved => closed
2013-10-16 19:46hudsonbotCheckin
2013-10-16 19:46hudsonbotNote Added: 0061741
2013-10-16 19:46hudsonbotCheckin
2013-10-16 19:46hudsonbotNote Added: 0061742

Notes
(0061641)
hgbot   
2013-10-09 19:46   
Repository: erp/devel/pi
Changeset: 1da36fb5ddbe739d316cd1a65088f3b4604dd265
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Oct 09 19:43:59 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1da36fb5ddbe739d316cd1a65088f3b4604dd265 [^]

Fixed 24919: Speedup AcctServer.checkDocuments
Avoid checking same docbasetype several times by only doing
check for distinct docbasetype values thus skipping duplicates
which happen as docbasetypes are defined per organization.

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql
---
(0061642)
hgbot   
2013-10-09 19:46   
Repository: erp/devel/pi
Changeset: e721f9bcbfc12aba39c46e660d0efc03bf31c8b3
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Oct 09 19:45:30 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e721f9bcbfc12aba39c46e660d0efc03bf31c8b3 [^]

Issue 24919: Small code-cleanup
Delete unused (non-public) selectDocuments methods in xsql file to make
it obvious that the method is not used.

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql
---
(0061646)
dmiguelez   
2013-10-10 10:22   
Code Review + Testing Ok
(0061741)
hudsonbot   
2013-10-16 19:46   
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/51315988909a [^]

Maturity status: Test
(0061742)
hudsonbot   
2013-10-16 19:46   
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/51315988909a [^]

Maturity status: Test