Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024507Openbravo ERPA. Platformpublic2013-08-07 15:582013-08-16 20:32
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0MP27 
alostale
Core
No
0024507: Add debugging code to OBDal flush() method to help debugging performance+memory usage problems
Sometimes calls to flush() are very slow and the time spent is not directly related to the needed dml calls in the database but rather spent on just iterating over all the entities in the hibernate session just to find out which objects in there have been modified.

To help debugging those problems 4 infos are useful
- time spent in flush, who called flush
- numbers of entities/collections in the hibernate session
- list of entities in the hibernate session.
Add the proposed items to the flush() method.
They should not do anything by default, but provide that info the log4j debug level logging is enabled for the OBDal class.
No tags attached.
Issue History
2013-08-07 15:58shuehnerNew Issue
2013-08-07 15:58shuehnerAssigned To => shuehner
2013-08-07 15:58shuehnerModules => Core
2013-08-07 15:58shuehnerTriggers an Emergency Pack => No
2013-08-07 15:59shuehnerReview Assigned To => alostale
2013-08-07 18:56hgbotCheckin
2013-08-07 18:56hgbotNote Added: 0060540
2013-08-07 18:56hgbotStatusnew => resolved
2013-08-07 18:56hgbotResolutionopen => fixed
2013-08-07 18:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1fb4fef1d70b3c004d63887bc4f1dbeaaab7e98e [^]
2013-08-08 15:28alostaleNote Added: 0060546
2013-08-08 15:28alostaleStatusresolved => closed
2013-08-08 15:28alostaleFixed in Version => 3.0MP27
2013-08-16 20:32hudsonbotCheckin
2013-08-16 20:32hudsonbotNote Added: 0060637

Notes
(0060540)
hgbot   
2013-08-07 18:56   
Repository: erp/devel/pi
Changeset: 1fb4fef1d70b3c004d63887bc4f1dbeaaab7e98e
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Aug 07 18:55:26 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1fb4fef1d70b3c004d63887bc4f1dbeaaab7e98e [^]

Fixed 24507: Add performance debugging cdoe to OBDal.flush().

Now with debug level logging for the OBDal class active every flush
call will log following extra into:
- stacktrace of caller of flush
- time taken in flush
- number of entities + collections in hibernate session
- list of all entries in hibernate session

This info allows to debug slow flush calls by analyzing the list of entities
loaded into that hibernate session

---
M src/org/openbravo/dal/service/OBDal.java
---
(0060546)
alostale   
2013-08-08 15:28   
code reviewed + tested
(0060637)
hudsonbot   
2013-08-16 20:32   
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/59a1180e7f4f [^]

Maturity status: Test