• Vincent Pelletier's avatar
    storage.database.mysqldb: Optimise getObject for most likely case. · 647dbc86
    Vincent Pelletier authored
    loadBefore is more likely than other loads, as it is how repeatable-read is
    implemented and the vast majority of accesses are scoped to a transaction.
    So put it first in 3-branches "if" choosing between load/loadBefore/loadSerial
    code paths.
    next_serial is likely to not be found, because application will likely
    operate on up-to-date objects. So a test is more efficient than a
    try..except. Inline this test in return statement to avoid defining a local.
    647dbc86
mysqldb.py 28.6 KB