optimize performace by modify log implement