Results 1 to 2 of 2

Thread: [validation] : Bean validator performance issues on large volume of data to validate.

  1. #1
    Join Date
    Mar 2005
    Location
    montreal, Canada
    Posts
    52

    Default [validation] : Bean validator performance issues on large volume of data to validate.

    Hi,

    I'm using the xml based bean validation from the springmodules in a data import feature.
    Basically we use jibx to parse a large XML file (60 Meg+) into javabeans then pass them one a time in a BeanValidator (backed by XML) to finally batch insert the valid ones into a database.

    I'm very happy to have used bean validator because it made us win a lot of time.

    But (and there is always a but, isn't) we have some memory consumption problems.
    I used JProfiler to find out where we ate some much memory.
    To my complete surprise (I was flabbergasted because my first impression was "it must be somewhere in our code") the system was creating millions of BeanWrapperImpl, so fast that some time the garbage collector wasn't able to clear them, leading to outof memory errors.
    I found where in our case :
    DefaultApplicabilityCondition.doCheck() andAbstractBeanCondition.doCheck methods. I tested to replace the use of BeanWrapperImpl by commons-beanutils PropertyUtils (static methods instead of one instance for each property) and our system improved in time and memory comsumption.

    I want to know what you guys think about it...thanks

    Paskos

  2. #2
    Join Date
    Mar 2005
    Location
    montreal, Canada
    Posts
    52

    Default [Validation] Create a jira bug for this ?

    Should I create a Jira tcket for this ?
    It's really painfull.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •