Improving Performance and Streamlining Interactions in API Calls and Statistics Retrieval Operations

This State Changers meeting focused on performance optimisation and issue debugging within the context of using Xano as a backend. The main discussion revolved around a use case where API calls are stored in a database to give inputs a starter value. This exercise was mainly focused on the current year's season averages in an unspecified sports context. There was an issue where the function took significantly longer than expected to execute.


The function was examined, and it was identified that the primary performance issue stemmed from the time taken by the API request. This was a fixed cost per player for each sport competition which resulted in a long waiting time due to the large number of players for each competition. Further exploration of the issue suggested that since the player season statistics were just a starting point, it would be more efficient to build an array of statistics as objects and then insert that as a single whole JSON or object array data type into the player season statistics table. This approach would dramatically reduce the number of writes from the current 88 writes to just one write per player, thereby enhancing performance. Another interesting point raised during the discussion was the concept of caching the queried JSON data to limit the number of API calls needed. This would be particularly useful since the number of such calls formed a significant limiting factor to the performance. In conclusion, debugging slower processes require patience and a strategic approach to identify the performance issues contributing to the delay. Inputs on optimising the process were shared, providing a solution to significantly improve the performance.


(Source: Office Hours 11/24 )

State Change Members Can View The Video Here
chris-montgomery-smgTvepind4-unsplash.jpg

View This Video Now

Join State Change Risk-Free