Commit ef04ed74 authored by Jason Madden's avatar Jason Madden

In _p_accessed combine two exception blocks as suggested by @tseaver, plus...

In _p_accessed combine two exception blocks as suggested by @tseaver, plus actually use the oid value we just cached. This knocks another 2 million calls to __getattribute__ out.
parent 162bcdf9
......@@ -477,14 +477,9 @@ class Persistent(object):
# that at this level, all we can do is catch it.
# The AttributeError arises in ZODB test cases
try:
cache = jar._cache
except AttributeError:
jar._cache.mru(oid)
except (AttributeError,KeyError):
pass
else:
try:
cache.mru(self.__oid)
except KeyError:
pass
def _p_is_in_cache(self):
oid = self.__oid
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment