Product Update

Places API Update: High Performance Searching

By Chris Winfield

Wed Mar 31 2021

Welcome to our end of March product update!
It feels like the first quarter of 2021 has passed in the blink of an eye, but progress continues at pace. This month, we've been working to fine-tune the performance of our upcoming location technology platform.

Why API performance matters

One of our key aims with the upcoming Swiftcomplete location platform is to return API responses in lightning-fast time with consistent low latency.
A key threshold for autocomplete is responding to keystrokes in under 100 milliseconds. Response times below 100ms feel instant, with anything above 100ms feeling laggy and unresponsive.
Response times are made up of two parts:
  • Search engine speed: The time it takes our location platform to generate a response
  • Network latency: The time it takes to send and receive a request over the network (out of our control)
Network latency varies between 10ms and 150ms or more depending on multiple factors, including whether you're on WiFi, 3G, 4G etc.
We can't control network latency, but we can optimise the location platform to generate responses as fast as possible.

Progress so far

Before we began optimising the performance this month, we were seeing internal response times consistently between 60ms and 70ms.
70ms may sound pretty fast, but it's right on the edge if you take into account any potential network latency.
This month, we've managed to reduce internal response times from 60-70ms to consistently between 3-10ms. We've also identified multiple further improvements that will bring internal response times down even further, potentially under 1ms.
With these performance improvements, we'll be able to deliver a great user experience even on mobile networks.

Scalability

Increasing search performance is great for usability, but it also means that we can scale in a sustainable way.
Reducing response times significantly increases the amount of requests that a single CPU core can handle per second:
  • 100ms: 10 per second
  • 70ms: 14 per second
  • 5ms: 200 per second
  • 1ms: 1000 per second
  • 0.5ms: 2000 per second
Reducing response times from 5ms to 1ms may not sound like a lot, but it boosts the number of requests that can be handled per CPU core from 200 per second to 1000 per second.
Thanks to these improvements, the Swiftcomplete location platform will have the capability of scaling to handle hundreds of thousands of requests per second.
The research and development that we've completed so far means that we'll be able to scale sustainably to support high volumes, while still delivering the best location search capability.

Summary

We've had great feedback this month from our key partners and early adopters, and we're coming to the end of our initial phase of research & development. In our next product update, we'll share how you can start building with our new location platform for the first time.
Click here to find out more about Swiftcomplete Places

More from the blog...