Closed
Description
Jochen Pier opened SPR-15198 and commented
There is a possible performance problem:
If you use:
@ModelAttribute
public void before(@ModelAttribute(name="test") TestClass test) {
test.setPayload("myPayload");
}
it is MUCH (10x) slower than the same
@ModelAttribute
public void before(Model model) {
TestClass t = new TestClass();
t.setPayload("myPayload");
model.addAttribute("test", t);
}
This is true especially in high traffic situations and is constantly getting worse (slower) over the time.
I think, maybe a hint in the documentation will be a good idea. (Or maybe you can find the problem)
Do you need a test-project?
Affects: 4.3.5
Issue Links:
- Annotated method argument matching performance issue [SPR-15060] #19626 Annotated method argument matching performance issue ("duplicates")