optimize commit