Fix: Fetch Stash-Box Studio Parents in the Scene Query - #7169
Merged
Conversation
StudioFragment selected only the parent's name and id, so resolveStudio issued a FindStudio query per scene whose studio has a parent. Those are serialised by the client's own rate limiter at one request per 250ms, which dominated the runtime of a multi-scene scrape: around two thirds of scenes have a parented studio, so a 40 scene batch spent roughly seven seconds waiting on lookups it could have avoided. Select the parent's fields in the fragment instead. resolveStudio becomes a pure conversion with no round trips, and a batch costs one query.
Gykes
approved these changes
Aug 17, 2026
Gykes
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Was able to build and do some minor testing with no obvious regressions.
The only thing I can think of is adding some smaller tests but shouldn't stop this going through
Contributor
|
Safe to merge 👍🏻 |
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.
Description
Adds studio parent query to studio fragment. This avoids the large number of round-trips to fetch single studios with delays in between. Not sure why it was ever implemented like that.
Related Issue
Testing
Tested locally and works fine. On the whole it should be a speedup with no other consequences.
Screenshots
Checklist
AI Usage Disclosure
Drafted with claude.
Additional Context