Skip to content

LIMS-42: Minor speedup of _get_all_containers#885

Merged
ndg63276 merged 2 commits intopre-release/2025-R2.3from
improvement/LIMS-42/speed-up-get_all_containers
Apr 8, 2025
Merged

LIMS-42: Minor speedup of _get_all_containers#885
ndg63276 merged 2 commits intopre-release/2025-R2.3from
improvement/LIMS-42/speed-up-get_all_containers

Conversation

@ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-42

Summary:

Getting a list of all containers for a proposal can be slow as there is a large number of joins needed. We have previously sped up the counting query, but there are still minor improvements that can be done to the main query.

Changes:

  • Only do the second join to ContainerInspection if looking at a specific container, not for the list of all containers
  • Don't get lastqueuedwell as it is not used anywhere and does take a little time
  • Clean up the list of fields that can be used to sort
  • Tidy up the columns queried, grouping them by table as much as possible

To test:

  • Go to a proposal with both plates and pucks, eg nr29467, and go to /containers
  • Check the table loads, and clicking on each column header sorts by that column
  • Check each filter at the top works (some of them might give no results)
  • Click on a particular plate, check the page loads ok, including the button saying "Request Plate Imaging" (this might not appear if someone has recently requested imaging, but that is unlikely)
  • Go back to /containers and then click on a particular puck, check the page loads ok
  • Go to /admin/imaging and check the Containers table works there as well

@ndg63276 ndg63276 changed the base branch from master to pre-release/2025-R2.3 April 8, 2025 10:42
@ndg63276 ndg63276 merged commit d84b0ee into pre-release/2025-R2.3 Apr 8, 2025
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-42/speed-up-get_all_containers branch April 8, 2025 11:19
ndg63276 added a commit that referenced this pull request Apr 22, 2025
* LIMS-995: Fix Shipment Stats page (#915)

* LIMS-91: Load sample image if specified in URL (#890)

* LIMS-1238: Speed up query to list persons on visit (#886)

* LIMS-1615: Allow direct links to visit summary page (#902)

* LIMS-42: Minor speedup of _get_all_containers (#885)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants