Improving performance by making fewer API calls on map changes