Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0033133 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
feature request | [Openbravo ERP] A. Platform | minor | have not tried | 2016-06-03 17:14 | 2022-02-01 08:09 | |||||||
Reporter | shuehner | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
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 | |||||||||||
Tags | Performance | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
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 |
Copyright © 2000 - 2009 MantisBT Group |