Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033133
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminorhave not tried2016-06-03 17:142022-02-01 08:09
ReportershuehnerView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033133: OBCriteria skip adding client+org filters if table is known to not required these.

DescriptionEvery 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 ReproduceMeasure 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
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0033132 closedplatform OBCriteria (at least sometimes) add client + org filters twice 

-  Notes
There are no notes attached to this issue.

- 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
Powered by Mantis Bugtracker