PERF: speed up breakUp

breakUp function is complicated now, add a capped memoizer to ensure it runs a lot less.