Tap pinning is not used by Homebrew or the Homebrew maintainers so issues relating to pinned taps (#5418, #5796) don’t get fixed. Tap pinning does not work consistently or reliably and is conceptually confusing to encourage users to use fully-scoped user/tap/formula naming or avoid shadowing core tap formulae' names instead.
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.
Some benchmark:
$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total
ClosesHomebrew/homebrew#44377.
Signed-off-by: Xu Cheng <xucheng@me.com>