• Jason Madden's avatar
    Connection.setstate passes the object's OID as a parameter to the helper Connection._setstate. · 228604dd
    Jason Madden authored
    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
    228604dd
Connection.py 52.5 KB