memoize size inside of the check method to only call a theoretically expensive operation once