Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035271Openbravo ERPA. Platformpublic2017-02-15 13:572017-11-20 12:51
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q1 
caristu
Core
No
0035271: OBCriteria overhead
Overhead in OBCriteria is high even after fixing 0020515, although now is much better as it is not locking.

Still big part of overhead is spent on org.hibernate.impl.SessionFactoryImpl.getImplementors.
Execute test cases provided in 0020515, overhead is ~3x compared with OBQuery:

Query with 1 threads done in 3728 ms
Query with 2 threads done in 1743 ms
Query with 3 threads done in 1287 ms
Query with 4 threads done in 1187 ms
Query with 5 threads done in 1121 ms
Query with 6 threads done in 1067 ms
Query with 7 threads done in 1000 ms
Query with 8 threads done in 955 ms

Criteria with 1 threads done in 10717 ms
Criteria with 2 threads done in 4915 ms
Criteria with 3 threads done in 3317 ms
Criteria with 4 threads done in 2796 ms
Criteria with 5 threads done in 2563 ms
Criteria with 6 threads done in 2486 ms
Criteria with 7 threads done in 2265 ms
Criteria with 8 threads done in 2176 ms

No tags attached.
related to design defect 0020515 closed alostale OBCriteria creates contention at JVM 
related to feature request 0037064 closed caristu upgrade hibernate to 5.3.2 
png Selection_158.png (23,313) 2017-02-15 14:01
https://issues.openbravo.com/file_download.php?file_id=10451&type=bug
png
Issue History
2017-02-15 13:57alostaleNew Issue
2017-02-15 13:57alostaleAssigned To => platform
2017-02-15 13:57alostaleModules => Core
2017-02-15 13:57alostaleTriggers an Emergency Pack => No
2017-02-15 14:00alostaleDescription Updatedbug_revision_view_page.php?rev_id=14602#r14602
2017-02-15 14:01alostaleFile Added: Selection_158.png
2017-02-15 14:01alostaleRelationship addedrelated to 0020515
2017-02-15 14:01alostaleStatusnew => acknowledged
2017-02-16 14:49alostaleNote Added: 0094389
2017-10-13 12:41alostaleRelationship addedrelated to 0037064
2017-11-13 13:09hgbotCheckin
2017-11-13 13:09hgbotNote Added: 0100481
2017-11-13 13:09hgbotStatusacknowledged => resolved
2017-11-13 13:09hgbotResolutionopen => fixed
2017-11-13 13:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ea74193b74fa03750c0d26bcb2da2a1103079969 [^]
2017-11-13 13:10alostaleAssigned Toplatform => alostale
2017-11-13 13:10alostaleReview Assigned To => caristu
2017-11-20 12:51caristuNote Added: 0100620
2017-11-20 12:51caristuStatusresolved => closed
2017-11-20 12:51caristuFixed in Version => 3.0PR18Q1

Notes
(0094389)
alostale   
2017-02-16 14:49   
Reported to Hibernate: https://hibernate.atlassian.net/browse/HHH-11495 [^]
(0100481)
hgbot   
2017-11-13 13:09   
Repository: erp/devel/pi
Changeset: ea74193b74fa03750c0d26bcb2da2a1103079969
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 09 10:41:46 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ea74193b74fa03750c0d26bcb2da2a1103079969 [^]

fixed 37115, fixed 35271: hibernate performance improvements

  * 37115: HQL constant parsing causes contention
     Backports Hibernate issues HHH-4959 and HHH-11377, preventing in most of
     the cases to verify whether a HQL token is a constant which invokes an
     expensive classForName.

  * 35271: OBCriteria overhead
     OBCriteria caused overhead because everytime a critieria was executed, entity
     implementors (java class) was checked. As for a given entity its implementors
     are constant, they can be safelly cached. Note this cache is fixed in size as,
     at most, it will contain an entry per entity. See HHH-11495.

---
M lib/runtime/hibernate3-patched.jar
---
(0100620)
caristu   
2017-11-20 12:51   
Verified with test cases provided in 0020515