Skip to content

Fix: Fetch Stash-Box Studio Parents in the Scene Query - #7169

Merged
Gykes merged 1 commit into
stashapp:developfrom
InfiniteStash:stashbox-studio-parents
Aug 19, 2026
Merged

Fix: Fetch Stash-Box Studio Parents in the Scene Query#7169
Gykes merged 1 commit into
stashapp:developfrom
InfiniteStash:stashbox-studio-parents

Conversation

@InfiniteStash

Copy link
Copy Markdown
Collaborator

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

  • I have read and understood the Contributing document.
  • I have read and understood the AI Usage Policy document.
  • I have made corresponding changes to the documentation (if applicable).

AI Usage Disclosure

  • I have used AI tools to assist with this pull request, and I have disclosed the tools and how I used them below.

Drafted with claude.

Additional Context

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 Gykes added the chore Tedious admin work or code refactoring label Aug 17, 2026
@Gykes Gykes added this to the Version 0.32.0 milestone Aug 17, 2026

@Gykes Gykes 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.

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

@Gykes Gykes changed the title Fetch stash-box studio parents in the scene query Fix: Fetch Stash-Box Studio Parents in the Scene Query Aug 17, 2026
@slick-daddy

Copy link
Copy Markdown
Contributor

Safe to merge 👍🏻

@Gykes
Gykes merged commit 6b6443a into stashapp:develop Aug 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Tedious admin work or code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants