Uploaded image for project: 'Hibernate Validator'
  1. HV-589

Keep a constant metadata placeholder for unconstrained entities

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.0.Final
    • Fix Version/s: 5.1.0.Beta1
    • Component/s: engine
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      Andrej Golovnin wrote:

      After updating JBoss 7 to use the Hibernate Validator 4.3.0 and
      adding <property name="javax.persistence.validation.mode" value="NONE"/>
      to our persistence.xml file I was able to reduce memory consumption
      of SerializableValidatorFactory from ca. 90MB to ca. 256KB.
      What I was not able to do, is to avoid loading of Hibernate Validator
      and Hibernate Envers at all as we don't use them.

      Emmanuel's reply:

      If you do not use Hibernate Validator annotations, 90MB might indeed be too much Hardy, I wonder if we could optimize the memory model and JPA initialization so that we check if a class has constraints and if it does not, Hibernate Validator keeps a small placeholder to remember that but does not consume any other memory for this non validated class. We could save a lot instead of building the model and keeping it in memory.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: