- 27 Apr, 2015 2 commits
-
-
Jason Madden authored
-
Jason Madden authored
First, eliminate the use of the RingWrapper object and always delete by index. It was only necessary to allow use of ring.remove(). This had some performance impact, but mostly saves memory. Second, eliminate the use of `enumerate` in the hot mru() path. This was the big performance win. Current results: ** concurrency=2 ** "Transaction", mysql before "Add 3000 Objects", 7424 5486 "Update 3000 Objects", 5699 4141 "Read 3000 Warm Objects", 4571 4003 "Read 3000 Cold Objects", 4932 4204 "Read 3000 Hot Objects", 17295 10416 "Read 3000 Steamin' Objects", 346331 168983
-
- 24 Apr, 2015 1 commit
-
-
Jason Madden authored
Under PyPy, CPython, and Jython, collections.dequeue is a built-in type. Using it doubles PyPy's performance under `zodbshootout` (previously, picklecache.mru() was the biggest bottleneck).
-
- 22 Apr, 2015 1 commit
-
-
Jason Madden authored
Some very minor tweaks to avoid going through the __getattribute__ path so much have large consequences for `zodbshootout`: Results show objects written or read per second. Best of 3. (before/after on pypy2.5.1) "Transaction", before after cpython2.7 "Add 3000 Objects", 534 2340 11711 "Update 3000 Objects", 330 3035 11333 "Read 3000 Warm Objects", 1168 1941 9086 "Read 3000 Cold Objects", 1647 4161 9484 "Read 3000 Hot Objects", 2647 11086 45220 "Read 3000 Steamin' Objects", 30523 108138 5321032
-
- 14 Apr, 2015 2 commits
-
-
Jason Madden authored
-
Jason Madden authored
-
- 13 Apr, 2015 1 commit
-
-
Jason Madden authored
-
- 11 Apr, 2015 1 commit
-
-
Jason Madden authored
The python _p_activate does state management like the C version does: set to changed during jar.setstate to prevent objects that set attributes in their __setstate__ from being registered with the jar, and unconditionally mark the object as saved when finished. This fixes problems with BTrees and DB churn, among other things. Test this.
-
- 10 Apr, 2015 4 commits
-
-
Jason Madden authored
Deleting the jar of a ghosted Python persistent object shouldn't try to activate it. This was an error encountered testing ZEO: ```python File "//Projects/GithubSources/ZEO/src/ZEO/tests/testZEO.py", line 1566, in ZEO.tests.testZEO.gracefully_handle_abort_while_storing_many_blobs Failed example: c.tpc_abort(t) Exception raised: Traceback (most recent call last): File "//bin/pypy/lib-python/2.7/doctest.py", line 1315, in __run compileflags, 1) in test.globs File "<doctest ZEO.tests.testZEO.gracefully_handle_abort_while_storing_many_blobs[12]>", line 1, in <module> c.tpc_abort(t) File "//Projects/VirtualEnvs/ZODBpypy/site-packages/ZODB-4.2.0.dev0-py2.7.egg/ZODB/Connection.py", line 754, in tpc_abort self._invalidate_creating() File "//Projects/VirtualEnvs/ZODBpypy/site-packages/ZODB-4.2.0.dev0-py2.7.egg/ZODB/Connection.py", line 775, in _invalidate_creating del o._p_jar File "//Projects/VirtualEnvs/ZODBpypy/site-packages/persistent-4.0.10.dev0-py2.7.egg/persistent/persistence.py", line 287, in __delattr__ object.__delattr__(self, name) File "//Projects/VirtualEnvs/ZODBpypy/site-packages/persistent-4.0.10.dev0-py2.7.egg/persistent/persistence.py", line 92, in _del_jar self.__setattr__('_Persistent__jar', None) File "//Projects/VirtualEnvs/ZODBpypy/site-packages/persistent-4.0.10.dev0-py2.7.egg/persistent/persistence.py", line 249, in __getattribute__ oga(self, '_p_activate')() File "//Projects/VirtualEnvs/ZODBpypy/site-packages/persistent-4.0.10.dev0-py2.7.egg/persistent/persistence.py", line 358, in _p_activate jar.setstate(self) File "//Projects/VirtualEnvs/ZODBpypy/site-packages/ZODB-4.2.0.dev0-py2.7.egg/ZODB/Connection.py", line 869, in setstate self._setstate(obj) File "//Projects/VirtualEnvs/ZODBpypy/site-packages/ZODB-4.2.0.dev0-py2.7.egg/ZODB/Connection.py", line 910, in _setstate p, serial = self._storage.load(obj._p_oid, '') File "//Projects/GithubSources/ZEO/src/ZEO/ClientStorage.py", line 842, in load data, tid = self._server.loadEx(oid) File "//Projects/GithubSources/ZEO/src/ZEO/ServerStub.py", line 176, in loadEx return self.rpc.call("loadEx", oid) File "//Projects/GithubSources/ZEO/src/ZEO/zrpc/connection.py", line 781, in call raise inst # error raised by server POSKeyError: 0x02'') ```
-
Tres Seaver authored
Fix tests for TimeStamp hashcode under 32-bit Pythons.
-
Jason Madden authored
-
Jason Madden authored
-
- 09 Apr, 2015 22 commits
-
-
Jason Madden authored
While we're optimizing, use a set to combine two 'specialness' checks in getattribute into one. This reduces the ZODB test runtime by about another 4-5%
-
Jason Madden authored
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.
-
Jason Madden authored
Optimizations. Primarily, this changes _p_accessed to avoid recursively calling back to __getattribute__. When running the ZODB test suite, this changes the number of times that __getattribute__ is called from over 44 MILLION to just 1.3 million (and changes the cumulative time from 38 seconds to 11 seconds). Secondarily, this potentially also makes a few things safer for Broken objects.
-
Jason Madden authored
Detect whether we need to do a gc after sweeping the cache. Document why we would need to or not. Add tests to make sure it works (previously only in the ZODB tests.)
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Tres Seaver authored
Use `ctypes.c_long` to get the native long type on all platforms; fixes 32-bit TimeStamp hashcode
-
Jason Madden authored
More functional tests from ZODB: test persistent class invalidation, and changing the _p_oid and _p_jar when not in a jar's cache.
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
Detect the bitness of the current process in order to better match the C TimeStamp hashcode. Fixes zopefoundation/persistent#21
-
Jason Madden authored
Detect the bitness of the current process in order to better match the C TimeStamp hashcode. Fixes zopefoundation/persistent#21
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
- 08 Apr, 2015 6 commits
-
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
-
Jason Madden authored
More on C and ZODB compatibility for Python PickleCache and Persistent. There are some interconnected lifetime issues that this solves for ZODB's cache tests, and what appear to be some genuine bugs in invalidation.
-