Optimize updates calculation