batched attribute removal to prevent memory limit overflow.