The Sentry team used open-source Flagr to replace their feature flag software and implemented batch evaluation to reduce the number of individual flag checks, but this led to performance issues with deserialization of large JSON responses. They manually instrumented Flagr's Python client to find that the majority of the time was spent deserializing JSON, not making the HTTP call to the API. After patching their own deserializer and removing unnecessary cache checks, they were able to reduce the time taken to check all 50 feature flags from 900ms to 200ms, with further optimization reducing it to 10ms by ensuring that each flag was only checked once. The use of Performance tools helped identify the issues and allowed the team to optimize their implementation effectively.