Skip to content

Optimize Necropsy Schedule - #1048

Merged
labkey-jeckels merged 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_necropsySchedule
Sep 25, 2026
Merged

labkey-jeckels merged 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_necropsySchedule

Conversation

@labkey-jeckels

Copy link
Copy Markdown
Contributor

Rationale

When users rapidly page through months in Necropsy Schedule, it issues separate and moderately expensive queries for each month. That's fine if they only page a few months or page slowly. If they page 30 months with repeated clicks, it's a lot of load for the DB.

Changes

  • Switch to pull the full schedule from study.necropsy, which can return all of the needed data for the calendar view in < 1 second
  • Fetch details for the panel on demand when the user clicks to view the details
  • Optimize Necropsy Schedule joins single-row filtered selects. Neutral on performance when queried without filters.
  • Enable paging by year or showing the full year to improve UX

@labkey-jeckels

Copy link
Copy Markdown
Contributor Author

I was able to test the query change's performance against the production server. I am not set up to test the UI changes locally against real data, so please test carefully as part of reviewing this PR.

@guyinco6nito guyinco6nito left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Please apply this to the EHR-stage server that's currently evaluating LabKey 26.7, we can have the users try it out on that server.
Thanks,
-Dan Metzger

@labkey-jeckels
labkey-jeckels merged commit 1bd8352 into release26.3-SNAPSHOT Sep 25, 2026
8 of 11 checks passed
@labkey-jeckels
labkey-jeckels deleted the 26.3_fb_necropsySchedule branch September 25, 2026 00:19
@labkey-jeckels

Copy link
Copy Markdown
Contributor Author

Merged per guidance from Marty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants