Skip to content

Speed up loading Performance new/edit form

Paul Mather requested to merge composition_query into master

Created by: whunter

Speed up query that populates the "composition_id" field in the Performance new/edit form.


JIRA Ticket: (https://webapps.es.vt.edu/jira/browse/LIBTD-1530) ()

What does this Pull Request do? ()

When a user tries to create a Performance record the form takes forever to load because the service that populates it is pulling every Composition record from Fedora. (It actually loops through all of them and then does a query for each individual one again). With almost 500 Composition records this takes a really long time. This PR changes the service to pull all of the Composition records from solr instead.

What's the changes? ()

  • Creates a custom search builder that returns all Composition records.
  • Modifies the composition_service to use the solr search and then create the array to populate the form field.

How should this be tested?

  • Use the rake tasks to create all of the User, Composition, and Performance records.
  • Check that the form page loads in a reasonable time and doesn't hang when creating a Performance record
  • Check that the Composition drop-down is populated with all of the Composition records
  • Attach a Composition to the Performance being created
  • Make sure that the selected Composition is present on the Performance show page

Additional Notes:

  • branch: composition_query

Interested parties

@shabububu

() Required fields

Merge request reports