apt.Cache: Avoid unneccessary double weakref checks for __getitem__
__getitem__ included an optimization to first check the weakref dictionary for the key. This optimized performance if __getitem__ was called with a non-canonical name, like foo where foo:amd64 is the canonical name (the pretty full name). It, however, vastly decreased performance in the common case. We do the unification of packages using the canonical name in _rawpkg_to_pkg, so let's just drop this optimization.
Showing with 8 additions and 12 deletions