[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3922) [Memory] Hibernate should use less empty sets and/or collections and intern strings

Sergey Vladimirov (JIRA) noreply at atlassian.com
Wed May 20 15:31:13 EDT 2009


[Memory] Hibernate should use less empty sets and/or collections and intern strings
-----------------------------------------------------------------------------------

                 Key: HHH-3922
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3922
             Project: Hibernate Core
          Issue Type: Improvement
          Components: core
            Reporter: Sergey Vladimirov
            Priority: Minor


Hibernate uses many empty hashsets and collections initialized with default sizes (16).

 java.util.HashMap
Length # Objects Shallow Heap Retained Heap 
0 - 17 116 - 684 640 >= 1 853 608  <!-- emtpy sets without objects, most of them - from Hibernate
1 - 2 214 - 88 560 >= 423 240 
2 - 1 140 - 45 600 >= 317 696 
5 - 873 - 34 920 >= 383 632 
3 - 489 - 19 560 >= 988 112 
4 - 374 - 14 960 >= 206 560 

Empty or not good filled sets examples:
HqlSqlWalker: querySpaces;
FromClause: fromElements; 

As well some strings should be interned to reuse strings pool memory:
antlr.CommonAST: text


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list