summaryrefslogtreecommitdiff
path: root/test/orm/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-05-17 18:17:46 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-05-17 18:17:46 +0000
commit2be867ffac8881a4a20ca5387063ed207ac876dc (patch)
tree30b4a8d0663febea019679442c1f98360eb5ce26 /test/orm/query.py
parent6515e84d4c7084d9276922786291f6e047b70b84 (diff)
downloadsqlalchemy-2be867ffac8881a4a20ca5387063ed207ac876dc.tar.gz
- Significant performance enhancements regarding Sessions/flush()
in conjunction with large mapper graphs, large numbers of objects: - The Session's "weak referencing" behavior is now *full* - no strong references whatsoever are made to a mapped object or related items/collections in its __dict__. Backrefs and other cycles in objects no longer affect the Session's ability to lose all references to unmodified objects. Objects with pending changes still are maintained strongly until flush. [ticket:1398] The implementation also improves performance by moving the "resurrection" process of garbage collected items to only be relevant for mappings that map "mutable" attributes (i.e. PickleType, composite attrs). This removes overhead from the gc process and simplifies internal behavior. If a "mutable" attribute change is the sole change on an object which is then dereferenced, the mapper will not have access to other attribute state when the UPDATE is issued. This may present itself differently to some MapperExtensions. The change also affects the internal attribute API, but not the AttributeExtension interface nor any of the publically documented attribute functions. - The unit of work no longer genererates a graph of "dependency" processors for the full graph of mappers during flush(), instead creating such processors only for those mappers which represent objects with pending changes. This saves a tremendous number of method calls in the context of a large interconnected graph of mappers. - Cached a wasteful "table sort" operation that previously occured multiple times per flush, also removing significant method call count from flush(). - Other redundant behaviors have been simplified in mapper._save_obj().
Diffstat (limited to 'test/orm/query.py')
-rw-r--r--test/orm/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/orm/query.py b/test/orm/query.py
index e95f10ba2..5abcce689 100644
--- a/test/orm/query.py
+++ b/test/orm/query.py
@@ -371,7 +371,7 @@ class OperatorTest(QueryTest, AssertsCompiledSQL):
)
u7 = User(id=7)
- attributes.instance_state(u7).commit_all()
+ attributes.instance_state(u7).commit_all(attributes.instance_dict(u7))
self._test(Address.user == u7, ":param_1 = addresses.user_id")