Skip to content
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

Fixing up spell endpoint to fetch all needed data beforehand #592

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

tylereed
Copy link
Contributor

Added in the related tables that were being fetched row by row when querying spells. Locally, the speed went from 263 ms to 51 ms with these changes. Data returned is the same, but performs 5 queries versus >250.

We should be able to apply this to other endpoints, but I first wanted to test this change out to see if it's working better.

@tylereed
Copy link
Contributor Author

This affects #577

Copy link
Contributor

@calumbell calumbell left a comment

Choose a reason for hiding this comment

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

PR runs well on local. Observing a noticable improvement in response times when pulling data v2/spells. Code looks good, although popping in some short comments exlaining the two new methods would be helpful

@augustjohnson augustjohnson merged commit e009405 into open5e:staging Oct 22, 2024
4 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.

3 participants