improve stats update efficiency