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

Closed
spring-projects-issues opened this issue Jan 13, 2014 · 1 comment
Closed

Comments

@spring-projects-issues
Copy link
Collaborator

@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

@spring-projects-issues
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants