flush list after certain amount of commits