Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-11304

Optimize lookup of field errors in AbstractBindingResult

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Complete
    • 3.2.6, 4.0 GA
    • 3.2.7, 4.0.1
    • Core
    • None
    • true

    Description

      There is a performance issue when Spring MVC validates a large object graph using JSR 303 Bean Validation API & Hibernated Validator.

      Here is the object structure for the sample project in spring-framework-issues...

       - Address
         - propA (string)
         - propB (string)
         - propC (List) // has around 100 elements
              - Object1
                  - propA (string)
                  - propB (List)  // has around 30 elements
                      - Object 2
                           - propA
                           - propB
                           - propC
      

      Worst case it takes about 2.5 seconds to process a request that fails validation. Without validation, processing is very fast.

      Attachments

        Issue Links

          Activity

            People

              rstoya05-aop Rossen Stoyanchev
              dmikusa Daniel Mikusa
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 38 weeks, 1 day ago