Skip to content

perf: improve querying, avoid n+1 #115

Merged
DavideIadeluca merged 2 commits intomasterfrom
di/query-optimizations
Mar 31, 2026
Merged

perf: improve querying, avoid n+1 #115
DavideIadeluca merged 2 commits intomasterfrom
di/query-optimizations

Conversation

@DavideIadeluca
Copy link
Copy Markdown
Member

Fixes #0000

Changes proposed in this pull request:

Reviewers should focus on:

Screenshot

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

Required changes:

@DavideIadeluca DavideIadeluca marked this pull request as ready for review March 30, 2026 14:26
@DavideIadeluca DavideIadeluca requested a review from a team as a code owner March 30, 2026 14:26
Copy link
Copy Markdown
Member

@dsevillamartin dsevillamartin left a comment

Choose a reason for hiding this comment

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

Tested locally, /api/discussions (~23 queries without polls) went from ~44 to ~25 queries with 20 discussions in output. hasPoll attribute still functioned as intended.

@DavideIadeluca DavideIadeluca merged commit 3af76c0 into master Mar 31, 2026
25 checks passed
@DavideIadeluca DavideIadeluca deleted the di/query-optimizations branch March 31, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants