Has anybody else experienced this behavior? I had originally posted this in the data forum, apparently a mod has decided this is a ROO issue.
I think I'll file a jira ticket.
Ticket logged https://jira.springsource.org/browse/ROO-2943
Printable View
Has anybody else experienced this behavior? I had originally posted this in the data forum, apparently a mod has decided this is a ROO issue.
I think I'll file a jira ticket.
Ticket logged https://jira.springsource.org/browse/ROO-2943
OK so I've tracked down the cause of this.
The controllers that get generated by roo have the @ModelAttribute annotation attached to several populate methods. See this for more info.
This causes a rather heavy query of findAllPlanets to be called and added to the ui Model on every request, even if the view doesn't require it. That's naughty.
At the moment my solution is to push these methods in and return null. e.g. from the pet clinic sample.
This method from PetController_Roo_Controller.aj
Becomes the follwoing in PetController.javaCode:@ModelAttribute("pets")
public Collection<Pet> PetController.populatePets() {
return Pet.FindAllPets();
}
But something more elegant is definitely required.Code:@ModelAttribute("pets")
public Collection<Pet> populatePets() {
return null;
}
I'm glad you've found the reason. I had no time to watch this.
There's a POST and a JIRA ticket on this regard, but now I don't remember any of them.
This is a very-very sad programming issue... Unfortunately, It has been dangling there forever.
I reported -and fixed- long time ago in http://pragmatikroo.blogspot.com/201...libration.html.
What is ever more disturbing is that none of the documentation available on Roo -including books-, take care of it.
This just a little example of having other product advocates and book writers than the "official" ones would be on the best interest of everybody vested in SR.
B. Roogards
jD
Hi JD,
The post seems to be a story of you fixing a performance issue. Sadly no technical detail at all. Would you care to go into detail? I'm sure we'd all benefit if you've found anything we may have missed.
@aRJUNsOL,
Two Spring Roo "true stories*" at https://pragmatikroo.org/showcases for you to check out...
I've been trying to get the attention of SR stakeholders and book publishers -for supporting my work- for properly sharing a lot of SR stuff.
As you statedI need to be included in the ALL that you mentioned.Quote:
I'm sure we'd all benefit...
B. Roogards
jD
*Best results using Chrome