Guides / Building Search UI / Going further

Improve Performance for InstantSearch Android

Mitigate the impact of a slow network on your application

You can mitigate the impact of slow network on your search experience by managing the user’s expectations. One way of letting them know that the network is suboptimal is by displaying a progress indicator, which avoids them being frustrated by the network delays and blaming your application for lack of responsiveness.

See the Loading widget to implement this pattern.

Optimize build size

See the Android Guide on shrinking your code and resources.

Queries per second (QPS)

Search operations aren’t limited by a fixed “search quota”. Instead, they’re limited by the maximum QPS and the operations limit of your plan.

Every keystroke in InstantSearch using the SearchBox counts as one operation. Then, depending on the widgets you add to your search interface, you may have more operations being counted on each keystroke. For example, if you have a search interface with a SearchBox, a HierarchicalMenu, and a RefinementList, then every keystroke triggers one operation. But as soon as a user refines the HierarchicalMenu or RefinementList, it triggers a second operation on each keystroke.

A good rule to keep in mind is that most search interfaces using InstantSearch trigger one operation per keystroke. Then, every refined widget (clicked widget) adds one more operation to the total count.

In case you have issue with the QPS you can consider implement a debounced SearchBox.

Did you find this page helpful?