Optimized updating map.