Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2037

Scalability of Roo Generated Controllers

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.1.RELEASE
    • Fix Version/s: 1.1.2.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      I think some important improvements need to be made to the generated Roo Contollers.
      e.g. Run the sample Clinic.roo script. Write some code to populate the connected DB (use MySql) with a few thousand Pets and Owners.

      Observe:
      aspect PetController_Roo_Controller {
      ...
      @ModelAttribute("owners")
      public Collection<Owner> PetController.populateOwners()

      { return Owner.findAllOwners(); }

      ...}

      @ModelAttribute causes this to run even if you are just doing a direct lookup/show on a Pet, even though 'owners' are not required in the model.
      It doesn't scale well when you have thousands of entities in the DB.
      Add to persistence.xml:
      <property name="hibernate.show_sql" value="true"/>
      and you will see the vast amount of SQL generated by Hibernate.

      It's quite a problem for Roo generated MVC projects where you'd like to leverage the generated controllers in big projects.

      Duncan.

        Attachments

          Activity

            People

            • Assignee:
              sschmidt Stefan Schmidt
              Reporter:
              duncand Duncan D
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: