Ability to analyze and compare code performance leads to reduced latency
Clark and his team have been working to build a caching infrastructure to reduce strain on the platform database. As they did so, Clark noticed long database query times with no clear optimization the team could make to the PostgreSQL query. Olo was already using Datadog Database Monitoring, which they used to rule out the database as the root cause, leading them to conclude that the bottleneck was actually the client application. “Datadog Database Monitoring said the issue was not on the database side, and we don’t need to serialize the data again, but instead, we need to check on the application side—something that we would not have thought of,” says Clark.
Clark then turned to Continuous Profiler and quickly found that their Postgres enums were not mapped properly, which caused the Npgsql library to use a costly path for mapping the unmapped enums.
The team decided to stop using enums and replace it with a more efficient solution for building their cache objects. Within minutes, database query times improved by 50 percent. The long-term benefit was even more significant as Olo was able to improve the documentation of its coding standards to avoid a similar issue in the future.
The company also uses Continuous Profiler for performance optimization. “At our scale, we definitely get into high-volume situations where every little bit counts,” says Clark. “Or we get into situations where something’s happening in our application, and it’s really hard to understand from the outside. Continuous Profiler enables us to dig into the underlying code performance and quickly fix any issues.”
“As we roll out new features to our users, we see fewer backups, and the system is more elastic under load.”