- The "nearest branches" feature is now much more accurate. Before the update, the API tended to favour nearest branches by longitude (east-west of your location) over latitude (north-south), resulting in branches further away but in an east-west direction ending up higher up the list than those north-south. The API was behaving like this because changes in longitude are much greater for the same distance on the ground than changes in latitude where UK and Ireland are located on the planet's surface. I had over-compensated for this effect in my arithmetic. In fact, for longitude the conversion to distance is the same as latitude except the value is multiplied by the cosine of the latitude. Lesson learned!
- Obtaining product information is much faster. This works by pooling the search session to a special account on our grocery API so all Tesco Finder users share the same login session - since you don't have to login as anyone to use Tesco Finder, the API has to login to a special grocery account in order to search for products and provide pricing and offer information. Before now, each search was preceded by a login for that user - nice and safe in the multi-threaded computing environment of the API. Sharing the same login session is a lot trickier because that session has to be locked to each user in turn while the search takes place. Fortunately it's so quick that the queue of search requests waiting in turn to lock the session does not build up.
That's why it's taken some time and lot of testing to ensure that this programming pain is worth the performance improvement for Tesco Finder customers. I'm glad to say it has worked out well - it's now live as of 1:30pm today.