salary: improve library functions,reducing DB flush IO;