]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
remove intermediary _is_clone_of entries when cloning
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 16 Mar 2022 16:37:20 +0000 (12:37 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 17 Mar 2022 14:11:24 +0000 (10:11 -0400)
commit58666d32742dc050c2e48c48ab8f946561636e8b
tree3355054bc17aa3651aa3d50f7222b9d1f11ddcfe
parent6acf5d2fca4a988a77481b82662174e8015a6b37
remove intermediary _is_clone_of entries when cloning

Improvements in memory usage by the ORM, removing a significant set of
intermediary expression objects that are typically stored when a copy of an
expression object is created. These clones have been greatly reduced,
reducing the number of total expression objects stored in memory by
ORM mappings by about 30%.

note this change causes the tests to have a bit of a harder time with
GC, which we would assume is because mappings now have a lot more
garbage to clean up after mappers are configured.   it remains
to be seen what the long term effects of this are.

Fixes: #7823
Change-Id: If8729747ffb9bf27e8974f069a994b5a823ee095
doc/build/changelog/unreleased_14/7823.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/selectable.py
test/aaa_profiling/test_memusage.py
test/orm/test_hasparent.py
test/orm/test_session.py