]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Prebuild the row string to position lookup for Rows
authorJ. Nick Koston <nick@koston.org>
Wed, 19 Apr 2023 22:39:18 +0000 (18:39 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 26 Apr 2023 18:19:17 +0000 (20:19 +0200)
commitff198e35f0e04b8d38df25df234e72259069b4d1
treec48db9a0366b48c8caaa35ad9ab83a354aaa7d32
parent9f675fd042b05977f1b38887c2fbbb54ecd424f7
Prebuild the row string to position lookup for Rows

Improved :class:`_engine.Row` implementation to optimize
``__getattr__`` performance.
The serialization of a :class:`_engine.Row` to pickle has changed with
this change. Pickle saved by older SQLAlchemy versions can still be loaded,
but new pickle saved by this version cannot be loaded by older ones.

Fixes: #9678
Closes: #9668
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9668
Pull-request-sha: 86b8ccd1959dbd91b1208f7a648a91f217e1f866

Change-Id: Ia85c26a59e1a57ba2bf0d65578c6168f82a559f2
12 files changed:
doc/build/changelog/unreleased_20/9678.rst [new file with mode: 0644]
lib/sqlalchemy/cyextension/collections.pyx
lib/sqlalchemy/cyextension/resultproxy.pyx
lib/sqlalchemy/engine/_py_row.py
lib/sqlalchemy/engine/cursor.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/engine/row.py
test/aaa_profiling/test_resultset.py
test/base/test_result.py
test/perf/compiled_extensions.py
test/profiles.txt
test/sql/test_resultset.py