Skip to content

[BUGFIX] Resolved N+1 problem on v2/creatures#955

Merged
eepMoody merged 1 commit into
open5e:stagingfrom
calumbell:creature-n+1
Jun 8, 2026
Merged

[BUGFIX] Resolved N+1 problem on v2/creatures#955
eepMoody merged 1 commit into
open5e:stagingfrom
calumbell:creature-n+1

Conversation

@calumbell

Copy link
Copy Markdown
Contributor

Description

This PR fixes a bug on the /creatures endpoint where the crossreferences field was showing classic signs on an N+1 error. The crossreferences table was being queried once per entry returned, so 50 times per page of 50 results. This was fixed by adding crossreferences to the fields to prefetch in the EagerLoadingMixin

Related Issue

Closes #954

@eepMoody eepMoody merged commit 3555e3a into open5e:staging Jun 8, 2026
3 checks passed
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.

[BUG] N+1 problem on v2/creatures endpoint

2 participants