open5e / open5e-api

The api for open5e.com
Other
156 stars 97 forks source link

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

Closed tylereed closed 3 weeks ago

tylereed commented 3 weeks ago

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 commented 3 weeks ago

This affects #577