Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize lookup of field errors in AbstractBindingResult [SPR-11304] #15928

spring-projects-issues opened this issue Jan 13, 2014 · 1 comment
in: core status: backported type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Jan 13, 2014

Daniel Mikusa opened SPR-11304 and commented

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.

Affects: 3.2.6, 4.0 GA

Issue Links:

  • #16001 StringIndexOutOfBoundsException in AbstractErrors for class-level JSR-303 validator

Backported to: 3.2.7

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 13, 2014

Rossen Stoyanchev commented

I've made a small optimization in AbstractErrors that improves performance by ~ 30%. The overall request time is still not ideal but the number of errors (~12K) is unusually large. Given some additional details on the specific scenario that leads to this, we could make further optimzations.

@spring-projects-issues spring-projects-issues added status: backported type: enhancement in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.1 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core status: backported type: enhancement
None yet

No branches or pull requests

2 participants