commit more often to save memory