Skip to content

perf: Optimize db queries for preview panel #942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

TheBobBobs
Copy link

Summary

Add method get_tag_hierarchy to Library that returns a dict[TagId, list[ParentId]] and dict[TagId, Tag] containing every tag in the hierarchy. Update FieldContainers to use this new method.

Currently all places that call Library.tag_display_name already have the Tag object so we don't need to fetch it from db.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@TheBobBobs TheBobBobs force-pushed the perf/preview_panel branch from 4ef7c13 to 59460e4 Compare May 29, 2025 01:08
@CyanVoxel CyanVoxel added TagStudio: Search The TagStudio search engine Type: Performance An issue or change related to performance Status: Review Needed A review of this is needed labels Jun 4, 2025
@Computerdores Computerdores self-requested a review June 5, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed A review of this is needed TagStudio: Search The TagStudio search engine Type: Performance An issue or change related to performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants