optimized path-updating