Batch animal status lookups; don't re-run them on every weight keystroke - #1033
Closed
labkey-jeckels wants to merge 1 commit into
Closed
Batch animal status lookups; don't re-run them on every weight keystroke#1033labkey-jeckels wants to merge 1 commit into
labkey-jeckels wants to merge 1 commit into
Conversation
Contributor
Author
|
@guyinco6nito As I noted in the related ticket, I'm not set up to test this locally. Please work with your team to adopt this or a similar kind of patch ASAP. |
LeviCameron1
added a commit
that referenced
this pull request
Sep 10, 2026
## Rationale Based off of Josh's PR for 26.7 this extends it a little bit more adding a timeout on requests to 500ms. It looks like the ID field was a big problem since it was making a call to the demographics to verify the ID was correct for each keystroke. This further optimization waits for the user to stop typing before making that call. The feeding form doesn't seem to have the same problem with the ID field as the weights form so I didn't make any changes to it. ## Related Pull Requests #1033 ## Changes - Added timeout for call to demographics table to ensure the user stoped typing before calling. Weights form only. --------- Co-authored-by: labkey-jeckels <jeckels@labkey.com>
Contributor
Author
|
Closing in favor of Levi's 26.3 PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Removes a client-side request fan-out that made the weight and feeding forms issue one database query per animal. On 2026-09-10 a single weight-form session on one room sustained 300-380 requests per minute for roughly thirteen minutes, raising p95 response time for every other user on the server from 456 ms to 1.29s.
The weight form was the worse of the two because its status check re-ran the whole fan-out on every field edit, not just once per form; its slowest requests took up to 114 seconds and returned normally, so browsers gave up long before the server did and users reported timeouts that left no server-side errors to find.
The per-row lookups that populate each form's animal info pane are unchanged, since they fetch one animal at a time and feed a display that genuinely uses those columns.
Changes