Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0033133 | Openbravo ERP | A. Platform | public | 2016-06-03 17:14 | 2022-02-01 08:09 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0033133: OBCriteria skip adding client+org filters if table is known to not required these. | |||||||||||
Description | Every table in Openbravo is configured with a Data Access Level (in ad_table). For tables which are 'System only' adding filters for readable clients + organizations should not be required. So depending on the table used for a criteria those filters should be skipped to avoid some processing overhead. Any change here needs to be carefully validated to not break client+org security model. Also there maybe special cases (table joins) which probably require extra care. NOTE: Even some partial optimization for some cases (i.e. no joins) could be useful. | |||||||||||
Steps To Reproduce | Measure total runtime of i.e. OBMessageUtils.messageBD unmodified versus a version of the function which 'manually' removes those extra filters. To simulate change the following can be used: obcMessage.setFilterOnReadableClients(false); obcMessage.setFilterOnReadableOrganization(false); As a simple testcase to show performance difference the following can be used to do 10 runs of 10k invocations of the function with and without the proposed change. @Test public void testSHU2() { for (int run = 0; run < 10; run++) { long s1 = System.currentTimeMillis(); for (int i = 0; i < 10000; i++) { String res = OBMessageUtils.messageBD("OrderDocumentno"); } long s2 = System.currentTimeMillis(); log.info("Took: " + (s2 - s1)); } } Testing in a normal pristine pi + retail database show a runtime of a.) unmodified: ca. 8.4 seconds per run b.) patched: 6.8s per run In a different systems having a lot more organizations (ca. 300) the following time difference can be seen: a.) unpatched: ca. 12.1 seconds per run b.) patched: ca. 10.2s per run | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | Performance | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2016-06-03 17:14 | shuehner | New Issue | ||||||||||
2016-06-03 17:14 | shuehner | Assigned To | => platform | |||||||||
2016-06-03 17:14 | shuehner | Modules | => Core | |||||||||
2016-06-03 17:14 | shuehner | Triggers an Emergency Pack | => No | |||||||||
2016-06-03 17:14 | shuehner | Relationship added | related to 0033132 | |||||||||
2016-06-03 17:14 | shuehner | Tag Attached: Performance | ||||||||||
2022-02-01 08:09 | alostale | Assigned To | platform => Triage Platform Base |
There are no notes attached to this issue. |