Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-555

Reduce memory foodprint of BasicDynaBean

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.9.3, 2.0.0
    • None
    • DynaBean
    • None

    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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            tproko tza
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: