How I reduced an API call from >5 seconds to under 100ms
The author initially faced a slow API call in their text-based game, Pantherworld, which was powered by events on the Twitch stream. They used MongoDB as their NoSQL database solution but later realized that their data model requirements had evolved to require a relational model. To optimize the performance of the API call fetching leaderboard data, they implemented tracing using Sentry. Tracing allowed them to identify the root cause of the slowdown and make necessary code improvements. By refactoring the code and reducing unnecessary database queries, they managed to reduce the API call duration from over 5 seconds to under 100ms. The author emphasizes that tracing is a valuable tool for debugging performance issues in applications.
Company
Sentry
Date published
Dec. 5, 2024
Author(s)
Salma Alam-Naylor
Word count
2161
Language
English
Hacker News points
None found.