mardi 22 mars 2016

handling large amounts of data using the google maps api

I'm designing an android application where a user can enter there address and it will fetch a list of bars/clubs/eateries within a 300 miles radius.

The way it currently works is, The user inputs his/her address and the app sends a call to a RESTful service(asp) which then selects every bar/club/eaterie and checks there distance from the users location, puts any within a 300 mile distance into an array and returns the result as json once it's finished.

The problem is this is really slow because it has to select every bar/club/eaterie from the database and calculate the distance(I have roughly 20k rows of data)

The average response time for the entire process (user clicking search to having the information displayed on there phone) is about 6-8 seconds, I would like to get it down to about 1-2 seconds

Is there a better way to go about this ? having to select all of the records and check the distance for each one is what's causing the issue.



handling large amounts of data using the google maps api

Aucun commentaire:

Enregistrer un commentaire