Android Question autocomplete optimization

Tomas Petrus

Active Member
Licensed User
Longtime User
Hey guys
I am using autocomplete funcionality with custom list view for adress searches I call our API - where we implemented caching of requests with some expiration, and only when our API doesnt know the answer we ask HERE service. But still as amount of users and overall usage of our apps increase the costs are geting higher and higher.. its already few hundreds of euros monthly..
we are now consuming over 200 000 autosuggest api calls per month...and its growing...

So I am thinking about further optimization.... like don't send each request over 3 letters on _TextChanged event to API and implement some delay like 300ms to slow the flow of api calls and wait until the user really finished writing.. Also I dont want to decrease UI feeling.. so user doesnt think that service is not responding...

Any ideas has somebody try to solve it yet ?

thanks
 

Alexander Stolte

Expert
Licensed User
Longtime User
like don't send each request over 3 letters on _TextChanged event to API and implement some delay like 300ms to slow the flow of api calls and wait until the user really finished writing
This makes sense and should be built in.

Another idea would be to use Nominatim, which is based on Openstreetmap. You can run the API on your own Postgresql server, thus avoiding the expensive Here API. You can leave the Here API in as a backup, if the nominatim API does not land a hit, then you query the Here API.

 
Upvote 0

emexes

Expert
Licensed User
This is more for interest than of practical use here, and I suspect it's already included within Nominatim already, but... in Australia we have the absolutely wonderful open and free government data:

Geoscape's Geocoded National Address File (G-NAF) contains the details (including latitude and longitude) of every physical address in Australia.
 
Upvote 0
Top