- 30 Aug, 2017 1 commit
-
-
Jim Fulton authored
-
- 29 Aug, 2017 2 commits
-
-
Jason Madden authored
* Use a higher pickle protocol (2) for serializing objects on Python 2 Previously protocol 1 was used. This is more efficient for new-style classes (all persistent objects are new-style), according to the docs, at the cost of being very slightly less space efficient for old-style classes. In tests of a persistent object with two trivial numeric attributes, the higher protocol was 12 bytes smaller, and serialized and deserialized 1us faster. Introducing a reference to another new-style class for a more realistic test made the higher protocol twice as fast to serialize (20.5 vs 10.3us), almost half the size (215 vs 142 bytes), and it deserialized 30% faster (6.5 vs 4.6us). On Python 2, this will now allow open ``file`` objects to be pickled (loading the object will result in a closed file); previously this would result in a ``TypeError`` (as does under Python 3). We had tests that you couldn't do that with a BlobFile so I had to update it to still make that true. I wouldn't recommend serializing arbitrary open files under Python 2 (for one thing, they can't trivially be deserialized in Python 3), but I didn't take any steps to prevent it either. Since this hasn't been possible, there shouldn't be code in the wild that is trying to do it---and it wouldn't be forward compatible with Python 3 either.
-
XeL64 authored
-
- 25 Jul, 2017 4 commits
-
-
Tres Seaver authored
[ci skip]
-
Tres Seaver authored
-
Tres Seaver authored
Add badges to README.
-
Tres Seaver authored
[ci skip]
-
- 24 Jul, 2017 11 commits
-
-
Jason Madden authored
HistoricalStorageAdapter forwards release() to its instance
-
Jason Madden authored
[skip ci]
-
Jason Madden authored
Fixes #78. Also adjust the base wrapper's __getattr__ to be faster (500 vs 711ns in a benchmark of the common case) and behave the same on Python 2 vs Python 3 with regards to exceptions, should a method be implemented as an descriptor. In practice this probably makes no difference whatsoever, it's just the same pattern used for forwarding release.
-
Jason Madden authored
Add support for 3.6, drop 3.3
-
Jason Madden authored
[skip appveyor]
-
Jason Madden authored
Remove outdated comment. Remove redundant usedevelop. [skip ci]
-
Jason Madden authored
We need a newer setuptools on older versions of Python to be able to install recent Sphinx because of its use of environment markers.
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
-
Jason Madden authored
Also add note on supported versions to the docs and readme. Fixes #168. Update tox.ini to correctly run testdocumentation and DRY with test deps.
-
- 17 May, 2017 5 commits
-
-
Jim Fulton authored
-
Jim Fulton authored
-
Jim Fulton authored
-
Jim Fulton authored
-
Adam Groszer authored
* clean up references to DBs and Connections in pools * Implement an explicit clear() method for clearing all the items in the pool.
-
- 17 Apr, 2017 1 commit
-
-
Jason Madden authored
* Make all classes new-style. On PyPy, it's documented (http://pypy.org/performance.html#id3) that old-style classes are slow, and classes that derive from both old and new are especially slow. I checked with the PyPy devs on IRC today and they confirmed that's still true with the latest PyPy2 releases. Unfortunately, FileStorage was one such mixed class, as was Connection. Moving to new-style classes seems to have a positive impact in the benchmarks. Here's zodbshootout on PyPy2 5.7.1 against a FileStorage (running in --threads and with 5 reps to be sure we get warmed up). First, current ZODB: "Transaction", fs "Add 1000 Objects", 31,738 "Update 1000 Objects", 42,444 "Read 1000 Cold Objects", 51,894 "Read 1000 Hot Objects", 53,187 "Read 1000 Steamin' Objects", 835,877 And with this PR: "Transaction", fs "Add 1000 Objects", 35,651 "Update 1000 Objects", 54,906 "Read 1000 Cold Objects", 103,484 "Read 1000 Hot Objects", 84,721 "Read 1000 Steamin' Objects", 2,112,095 The tests that hit the storage extensively are notably faster, as are steamin and hot, Connection having been a mixed class. I ran all tests multiple times. The data files were removed between runs. There's some variation, but the new-style classes always seem better. For comparison, here's CPython 2.7.13: "Transaction", fs "Add 1000 Objects", 19,531 "Update 1000 Objects", 16,201 "Read 1000 Cold Objects", 22,111 "Read 1000 Hot Objects", 21,851 "Read 1000 Steamin' Objects", 880,582 Locally I've run the tests under 2.7 and they all passed.
-
- 14 Apr, 2017 1 commit
-
-
Jason Madden authored
Profiling (https://github.com/zodb/zodbshootout/pull/32/) showed that this method was the only blob-related method that showed up in a test of creating blobs, other than those that actually performed IO. With this change its total and cumulative time drops from 0.003/0.004 to 0.001/0.002 in a small benchmark. Blobs created per second shows a small but consistent improvement. Before: ncalls tottime percall cumtime percall filename:lineno(function) 100 0.005 0.000 0.005 0.000 {built-in method rename} 100 0.004 0.000 0.004 0.000 {function BlobFile.close at 0x1080d3a60} 200 0.003 0.000 0.004 0.000 blob.py:576(oid_to_path) 101 0.003 0.000 0.003 0.000 {built-in method mkdir} 100 0.002 0.000 0.002 0.000 blob.py:333(__init__) 402 0.002 0.000 0.005 0.000 {method 'dump' of '_pickle.Pickler' objects} 1 0.002 0.002 0.034 0.034 Connection.py:553(_store_objects) 201 0.002 0.000 0.002 0.000 {built-in method stat} 5633 0.001 0.000 0.002 0.000 {built-in method isinstance} After: ncalls tottime percall cumtime percall filename:lineno(function) 100 0.005 0.000 0.005 0.000 {built-in method rename} 101 0.005 0.000 0.005 0.000 {built-in method mkdir} 100 0.004 0.000 0.004 0.000 {function BlobFile.close at 0x10636aa60} 402 0.002 0.000 0.005 0.000 {method 'dump' of '_pickle.Pickler' objects} 100 0.002 0.000 0.002 0.000 blob.py:333(__init__) 1 0.002 0.002 0.035 0.035 Connection.py:553(_store_objects) 201 0.002 0.000 0.002 0.000 {built-in method stat} 4033 0.001 0.000 0.001 0.000 {built-in method isinstance} .... 200 0.001 0.000 0.002 0.000 blob.py:576(oid_to_path)
-
- 11 Apr, 2017 8 commits
-
-
Jim Fulton authored
-
Jim Fulton authored
-
Jason Madden authored
Fixes #158.
-
Jim Fulton authored
-
Jim Fulton authored
-
Jim Fulton authored
-
Jim Fulton authored
And emacs backups. :) Because of the way zest.releaser works, this isn't strictly necessary, but it makes the manifest checker shut up.
-
Jim Fulton authored
* Fixed: A blob misfeature set blob permissions so that blobs and blob directories were only readable by the database process owner, rather than honoring user-controlled permissions (e.g. umask).
-
- 09 Apr, 2017 1 commit
-
-
Jim Fulton authored
Tests running and passing on windows.
-
- 08 Apr, 2017 6 commits
-
-
Jim Fulton authored
-
Jim Fulton authored
-
Jim Fulton authored
-
Jim Fulton authored
Fix PyPI page
-
Jim Fulton authored
-
Jim Fulton authored
-