Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030291Openbravo ERPA. Platformpublic2015-06-30 17:512016-06-17 19:36
mtaal 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR16Q33.0PR16Q3 
caristu
Core
No
0030291: Reduce memory footprint of hibernate by re-using internal strings
Attached a zip file with patched hibernate version which internalizes strings used to build queries.
The zip file contains the patched hibernate jar, the changed source files and their unchanged counter parts.
Use the patched jar instead of the original jar file.

It shows to use 180+MB less than before.

The patched jar has been tested with the retail test suite, all relevant tests passed.
Performance
related to feature request 0037064 closed caristu upgrade hibernate to 5.3.2 
zip hibernate patch reduced memory.zip (3,787,090) 2015-06-30 17:51
https://issues.openbravo.com/file_download.php?file_id=8254&type=bug
Issue History
2015-06-30 17:51mtaalNew Issue
2015-06-30 17:51mtaalAssigned To => alostale
2015-06-30 17:51mtaalFile Added: hibernate patch reduced memory.zip
2015-06-30 17:51mtaalModules => Core
2015-06-30 17:51mtaalTriggers an Emergency Pack => No
2015-10-01 07:50alostaleStatusnew => acknowledged
2015-10-01 07:50alostaleTarget Version3.0PR15Q4 => 3.0PR16Q1
2015-12-21 13:04alostaleTarget Version3.0PR16Q1 =>
2016-02-03 08:22alostaleStatusacknowledged => scheduled
2016-04-12 10:16alostaleTarget Version => 3.0PR16Q3
2016-04-12 11:23alostaleTag Attached: Performance
2016-04-18 09:14alostaleReview Assigned To => caristu
2016-04-18 09:18hgbotCheckin
2016-04-18 09:18hgbotNote Added: 0085690
2016-04-18 09:18hgbotStatusscheduled => resolved
2016-04-18 09:18hgbotResolutionopen => fixed
2016-04-18 09:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ec4d1026e33515db5e3010c3c8d85608bf4a3a45 [^]
2016-04-18 09:20alostaleNote Added: 0085691
2016-04-22 15:41caristuNote Added: 0085906
2016-04-22 15:41caristuStatusresolved => closed
2016-04-22 15:41caristuFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087455
2017-10-13 12:39alostaleRelationship addedrelated to 0037064

Notes
(0085690)
hgbot   
2016-04-18 09:18   
Repository: erp/devel/pi
Changeset: ec4d1026e33515db5e3010c3c8d85608bf4a3a45
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Apr 18 09:17:10 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ec4d1026e33515db5e3010c3c8d85608bf4a3a45 [^]

fixed issue 30291: reduced DAL memory footprint

  It has been accomplished by making internal and caching select strings in this
  manner it is possible to make much more intesive reuse of them.

---
A lib/runtime/hibernate3-patched.jar
R lib/runtime/hibernate3.jar
---
(0085691)
alostale   
2016-04-18 09:20   
Actual changes in code can be seen here [1].

Having this patch in CR production sever for one week before pushing it, a reduction of about 180 MB in initial old generation used memory has been noticed resulting in less frequent major garbage collections.




[1] https://github.com/alostale/hibernate-orm/commit/612675c92c97bacd61d0c07a0802344eca42f5c0 [^]
(0085906)
caristu   
2016-04-22 15:41   
Verified
(0087455)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test