added a memoize decorater as well as added a way to limit the profile stats output