fix commitAll performance