Optimization for short circuiting diff detection loop that makes the server scary fast