You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "tza (Jira)" <ji...@apache.org> on 2022/06/15 19:36:00 UTC

[jira] [Updated] (BEANUTILS-555) Reduce memory foodprint of BasicDynaBean

     [ https://issues.apache.org/jira/browse/BEANUTILS-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tza updated BEANUTILS-555:
--------------------------
    Description: 
Hello, we sometimes use the dynabeans to load rows from the DB and add a small amount of columns (like 2-5 in most cases). In some cases we restore something like 1.000.000 rows.

The current org.apache.commons.beanutils2.BasicDynaBean.values uses a HashMap with default capacity of 16.

The constructor of BasicDynaBean would have the information for a smaller initial size via DynaClass.getDynaProperties().length.

 

Would it be ok, to create a pull request to provide a smaller initialCapacity of the HashMap to reduce the memory usage to the minimum needed?

> Reduce memory foodprint of BasicDynaBean
> ----------------------------------------
>
>                 Key: BEANUTILS-555
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-555
>             Project: Commons BeanUtils
>          Issue Type: Wish
>          Components: DynaBean
>    Affects Versions: 1.9.3, 2.0.0
>            Reporter: tza
>            Priority: Minor
>
> Hello, we sometimes use the dynabeans to load rows from the DB and add a small amount of columns (like 2-5 in most cases). In some cases we restore something like 1.000.000 rows.
> The current org.apache.commons.beanutils2.BasicDynaBean.values uses a HashMap with default capacity of 16.
> The constructor of BasicDynaBean would have the information for a smaller initial size via DynaClass.getDynaProperties().length.
>  
> Would it be ok, to create a pull request to provide a smaller initialCapacity of the HashMap to reduce the memory usage to the minimum needed?



--
This message was sent by Atlassian Jira
(v8.20.7#820007)