frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Fix Courses by Mesh Term Report

Open jrjohnson opened this issue 9 months ago • 1 comments

The SQL query we need to run on the API has way too many joins and performs terribly for the courses by meshDescriptors filter. Instead we can reverse the lookup here and first pull the descriptor and all of it's relationships and then turn that into course ids and query them like we do any other filter.

Makes for messy tests because the graphQL responses have to use a counter, but it's 100x faster and won't crash the API DB anymore so that seems worth it.

Refs ilios/ilios#5650 Fixes ilios/ilios#4540

jrjohnson avatar Feb 22 '25 06:02 jrjohnson

This doesn't seem to change anything? Screenshot 2025-02-24 at 10 01 48 AM

michaelchadwick avatar Feb 24 '25 18:02 michaelchadwick

Added this to the MeshTerms by course report as well, so both ways are now fixed.

jrjohnson avatar Feb 25 '25 05:02 jrjohnson

Screenshot 2025-02-25 at 8 13 15 AM Still seems like a problem :-/

michaelchadwick avatar Feb 25 '25 16:02 michaelchadwick

Pulling this back into Draft mode as there appear to be two issue:

  1. Unable to create a new Mesh Terms for Course report, getting a 400 from the API. Weird.
  2. Running this report for a large course (like Ground School 2022) isn't as performant as it should be. May need to make some more adjustments for this case.

jrjohnson avatar Feb 25 '25 18:02 jrjohnson

Back out of draft mode. The issue with running the report found by @michaelchadwick are when a school filter was added, I've fixed that. I'm unable to reproduce the saving issues I'm seeing in the netlify against demo, even running against demo on my local. I think it may be something unrelated.

jrjohnson avatar Feb 26 '25 04:02 jrjohnson

Deploy Preview for ilios-frontend ready!

Name Link
Latest commit 4c268e4faa06e073414228e9dcf9e330029b820c
Latest deploy log https://app.netlify.com/sites/ilios-frontend/deploys/67be9cdd59ecea0008671f2e
Deploy Preview https://deploy-preview-8377--ilios-frontend.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Feb 26 '25 04:02 netlify[bot]

Deploy Preview for ilios-frontend ready!

Name Link
Latest commit ae120a414d20c10847e1e7c6f9d28d8ce7d6d32b
Latest deploy log https://app.netlify.com/sites/ilios-frontend/deploys/67be9cf30427cf00086fafa7
Deploy Preview https://deploy-preview-8377--ilios-frontend.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Feb 26 '25 04:02 netlify[bot]

@jrjohnson Woo! That report now runs quickly.

michaelchadwick avatar Feb 26 '25 18:02 michaelchadwick