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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029903
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminorhave not tried2015-05-16 12:402015-05-26 10:12
ReportermtaalView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revision9c8ffa316dab
ProjectionnoneETAnoneTarget Version3.0PR15Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029903: Performance improvement in EntityAccessChecker.initialize

DescriptionHi,
For the import entry process which imports transactions from WebPOS we need to create OBContexts for each entry which gets imported. There is some caching of OBContexts but still there is a fair change that in large organisations each entry will be created for a different user.

Of the time spend on orderloading: 220 millis around 79 millis are spend on the EntityAccessChecker.initialize.

I found a way to bring this down to 10 millis by changing the query slightly. See the attached diff
Steps To ReproduceSee attached timings before and after the change.

Check the lines with Pre-1 and Pre-2, the difference between the two is the time spend on EntityAccessChecker.initialize.

TagsPerformance
Attached Filestxt file icon Perf-Before-Improvement.txt [^] (3,034 bytes) 2015-05-16 12:40 [Show Content]
txt file icon Perf-After-Improvement.txt [^] (6,131 bytes) 2015-05-16 12:40 [Show Content]
diff file icon 29903.diff [^] (2,511 bytes) 2015-05-16 12:41 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0077514)
mtaal (manager)
2015-05-16 12:43

Here is a link to the code which does OBContext caching and initializing:
https://code.openbravo.com/erp/devel/pi/file/86cf45227364/src/org/openbravo/service/importprocess/ImportEntryProcessor.java#l402 [^]

As an extra remark, we need to support importing 1000+ orders/tickets per minute, which means so saving 70 millis makes a lot of difference.
(0077668)
hgbot (developer)
2015-05-22 16:13

Repository: erp/devel/pi
Changeset: 9c8ffa316dabe2f0094ce8ea7330027be4985847
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri May 22 16:12:45 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9c8ffa316dabe2f0094ce8ea7330027be4985847 [^]

Fixes issue 29903: Performance improvement in EntityAccessChecker.initialize

---
M src/org/openbravo/dal/security/EntityAccessChecker.java
---
(0077672)
shuehner (administrator)
2015-05-23 13:56

Hi guys,
that change i think is even more useful then you link.

Just think of any web-service calls being done stateless (as they should).
I think any of those needs to go via that indirectly also every time.
(0077721)
hudsonbot (developer)
2015-05-25 18:01

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/8cc85f698754 [^]
Maturity status: Test
(0077743)
alostale (manager)
2015-05-26 10:12

code reviewed + tested

- Issue History
Date Modified Username Field Change
2015-05-16 12:40 mtaal New Issue
2015-05-16 12:40 mtaal Assigned To => AugustoMauch
2015-05-16 12:40 mtaal File Added: Perf-Before-Improvement.txt
2015-05-16 12:40 mtaal Modules => Core
2015-05-16 12:40 mtaal Triggers an Emergency Pack => No
2015-05-16 12:40 mtaal File Added: Perf-After-Improvement.txt
2015-05-16 12:41 mtaal File Added: 29903.diff
2015-05-16 12:43 mtaal Note Added: 0077514
2015-05-22 16:11 mtaal Review Assigned To => alostale
2015-05-22 16:13 hgbot Checkin
2015-05-22 16:13 hgbot Note Added: 0077668
2015-05-22 16:13 hgbot Status new => resolved
2015-05-22 16:13 hgbot Resolution open => fixed
2015-05-22 16:13 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9c8ffa316dabe2f0094ce8ea7330027be4985847 [^]
2015-05-23 13:56 shuehner Note Added: 0077672
2015-05-25 18:01 hudsonbot Checkin
2015-05-25 18:01 hudsonbot Note Added: 0077721
2015-05-26 10:12 alostale Tag Attached: Performance
2015-05-26 10:12 alostale Note Added: 0077743
2015-05-26 10:12 alostale Status resolved => closed
2015-05-26 10:12 alostale Fixed in Version => 3.0PR15Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker