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

View Revisions: Issue #20515 All Revisions ] Back to Issue ]
Summary 0020515: OBCriteria creates contention at JVM
Revision 2017-02-15 13:13 by alostale
Description OBCriteria is still adding more overhead than OBQuery, after fix 0020485 it is slower.

Note this measurement is just for overhead and not for query itself.

Profiling attached test cases, it can be seen most of the time is spent in class loading triggered by Hibernate criteria (cpu-time.png). An additional problem is this classloading is synchronized by class name (lock-monitor.png), this in practice means, concurrent threads needs to wait these locks to be released in order to execute the criteria.

The problem is the className SessionFactoryImpl.getImplementors receives [1] is not actually a classname but entity name, so ReflectHelper.classForName finally performs a locking Class.forName [2]

[1] https://github.com/alostale/hibernate-orm/blob/3.6.3-patched/hibernate-core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java#L827 [^]
[2] https://github.com/alostale/hibernate-orm/blob/3.6.3-patched/hibernate-core/src/main/java/org/hibernate/util/ReflectHelper.java#L192 [^]
Revision 2017-02-15 13:03 by alostale
Description OBCriteria is still adding more overhead than OBQuery, after fix 0020485 it is slower.

Note this measurement is just for overhead and not for query itself.

Profiling attached test cases, it can be seen most of the time is spent in class loading triggered by Hibernate criteria (cpu-time.png). An additional problem is this classloading is synchronized by class name (lock-monitor.png), this in practice means, concurrent threads needs to wait these locks to be released in order to execute the criteria.
Revision 2017-02-15 12:42 by alostale
Description OBCriteria is still adding more overhead than OBQuery, after fix 0020485 it is slower.

Note this measurement is just for overhead and not for query itself.
Revision 2017-02-15 12:38 by alostale
Description OBCriteria is still adding more overhead than OBQuery, after fix 0020485 it is twice slower.

Note this measurement is just for overhead and not for query itself.


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker