Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020485Openbravo ERPA. Platformpublic2012-05-14 11:232012-05-25 12:12
alostale 
alostale 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP123.0MP12 
Core
No
0020485: Slow OBCriteria
OBCriteria performs worse than OBQuery. For the same query, OBCriteria consumes x4 time in additional overhead.
-
Performance
related to design defect 0020515 closed alostale OBCriteria creates contention at JVM 
diff issue-20485.diff (1,601) 2012-05-14 11:25
https://issues.openbravo.com/file_download.php?file_id=5216&type=bug
zip org.openbravo.issue20485.zip (2,890) 2012-05-15 16:29
https://issues.openbravo.com/file_download.php?file_id=5226&type=bug
Issue History
2012-05-14 11:23alostaleNew Issue
2012-05-14 11:23alostaleAssigned To => alostale
2012-05-14 11:23alostaleModules => Core
2012-05-14 11:25alostaleFile Added: issue-20485.diff
2012-05-14 11:25alostaleNote Added: 0048609
2012-05-14 12:52shuehnerIssue Monitored: shuehner
2012-05-15 12:22alostaleTag Attached: Performance
2012-05-15 16:29alostaleFile Added: org.openbravo.issue20485.zip
2012-05-15 16:35alostaleNote Added: 0048655
2012-05-15 17:15alostaleDescription Updatedbug_revision_view_page.php?rev_id=3463#r3463
2012-05-15 17:16alostaleNote Edited: 0048655bug_revision_view_page.php?bugnote_id=0048655#r3465
2012-05-15 17:18alostaleRelationship addedrelated to 0020515
2012-05-15 17:40hgbotCheckin
2012-05-15 17:40hgbotNote Added: 0048660
2012-05-15 17:40hgbotStatusnew => resolved
2012-05-15 17:40hgbotResolutionopen => fixed
2012-05-15 17:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7924a2a98a3be2066f229c3f7ac6f9209c1f337a [^]
2012-05-17 12:06mtaalNote Added: 0048727
2012-05-17 12:06mtaalStatusresolved => closed
2012-05-17 12:06mtaalFixed in Version => 3.0MP12
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049136

Notes
(0048609)
alostale   
2012-05-14 11:25   
Attaching patch. Pending to prepare test case to check real improvement.
(0048655)
alostale   
2012-05-15 16:35   
(edited on: 2012-05-15 17:16)
Attached file can be unzipped under modules directory.

Executing "ant test" executes 5000 times an OBCriteria and 5000 times OBQuery.

Before the fix:
 -Time for OBCriteria 165246, time for OBQuery 6498. Note OBCriteria time hugely differs when executed as ant task or within tomcat context, ~24k ms in latter case. Might be due to different classpath/classloader?

After the fix:
 -OBCriteria 12352, OBQuery 6450. Times are very similar within Tomcat

After the fix overhead of OBCriteria over OBQuery has been reduced from x4 to x2

(0048660)
hgbot   
2012-05-15 17:40   
Repository: erp/devel/pi
Changeset: 7924a2a98a3be2066f229c3f7ac6f9209c1f337a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 15 17:21:13 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7924a2a98a3be2066f229c3f7ac6f9209c1f337a [^]

fixed bug 20485: Slow OBCriteria

  Do not calculate mappedClass each time its requiered but use cached one, which
  is present in super PojoEntityTuplizer.

---
M src/org/openbravo/dal/core/OBTuplizer.java
---
(0048727)
mtaal   
2012-05-17 12:06   
Reviewed
(0049136)
hudsonbot   
2012-05-25 12:12   
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/5401e185a8b0 [^]

Maturity status: Test