Skip to content

perf: improve DB queries#7806

Open
solracsf wants to merge 1 commit intomainfrom
improveDbPerformance
Open

perf: improve DB queries#7806
solracsf wants to merge 1 commit intomainfrom
improveDbPerformance

Conversation

@solracsf
Copy link
Copy Markdown
Member

@solracsf solracsf commented Mar 29, 2026

  • Target version: main

Summary

Loading a board with many cards triggered thousands of individual DB queries, one per card for attachment counts, stack lookups, and label/user assignments.

This introduces batch query methods across the mapper and service layers so that all data for a set of cards is fetched in a single query regardless of board size, and adds a performance test suite asserting the batching holds for a 13 boards × 100 cards × 5 attachments scenario.

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

@github-actions

This comment was marked as outdated.

1 similar comment
@github-actions

This comment was marked as outdated.

@solracsf solracsf force-pushed the improveDbPerformance branch from 7f608c4 to 5c6c880 Compare March 29, 2026 19:43
@github-actions

This comment was marked as outdated.

Signed-off-by: Git'Fellow <[email protected]>
@solracsf solracsf force-pushed the improveDbPerformance branch from 5c6c880 to 0202a72 Compare March 29, 2026 19:50
@solracsf solracsf changed the title perf: improve DB queries to fetch results perf: improve DB queries Mar 29, 2026
@github-actions

This comment was marked as outdated.

@solracsf solracsf marked this pull request as ready for review March 29, 2026 19:56
Copy link
Copy Markdown
Member

@grnd-alt grnd-alt left a comment

Choose a reason for hiding this comment

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

great work, thanks 🔥
I don't know if the test really tests anything tbh as it just checks if the new functions are used and not how many db queries are done...

also some comments in there that just describe what the function name already says basically.

But all in all I'm fine to merge

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants