Connection.setstate passes the object's OID as a parameter to the helper Connection._setstate.
This is a performance optimization for PyPy (profiling shows many recursive calls to Persistent.__getattribute__, and recursive calls seem to trouble the PyPy JIT; this eliminates many of them when loading objects): "Transaction", AFTER BEFORE "Add 3000 Objects", 20205 18505 "Update 3000 Objects", 24191 18807 "Read 3000 Warm Objects", 28920 26671 "Read 3000 Cold Objects", 28745 27487 "Read 3000 Hot Objects", 29563 27487 "Read 3000 Steamin' Objects", 1033758 916587
Showing
Please register or sign in to comment