memoize parents and bases and avoid refer on iOS runtime