summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/state.py
Commit message (Collapse)AuthorAgeFilesLines
...
* instance_dict may be modified before the GC triggers _cleanup on Jython, so eatPhilip Jenvey2009-08-211-2/+8
| | | | state mismatch AssertionErrors
* - renamed PASSIVE_NORESULT to PASSIVE_NO_RESULTMike Bayer2009-08-071-4/+8
| | | | | | | | | | | | | | | | - renamed PASSIVE_NO_CALLABLES to PASSIVE_NO_FETCH - passive now propagates all the way through lazy callables, all the way into query._get(), so that many-to-one lazy load can load the instance via the local session but not trigger any SQL if not available, fixes [ticket:1298] without messing up consistency of tests added in r6201 - many-to-one also handles returning PASSIVE_NO_RESULT for the "old" value thus eliminating the need for the previous value even if the new value is None - query._get() uses identity_map.get(), which has been changed to no longer raise KeyError, thus providing mythical time savings that didn't seem to make any difference in how fast the unit tests ran.
* merge 0.6 series to trunk.Mike Bayer2009-08-061-3/+9
|
* - Fixed potential memory leak whereby previously pickled objectsMike Bayer2009-07-101-2/+7
| | | | | placed back in a session would not be fully garbage collected unless the Session were explicitly closed out.
* - Trimmed the pickle format for InstanceState which should furtherMike Bayer2009-06-161-27/+37
| | | | | reduce the memory footprint of pickled instances. The format should be backwards compatible with that of 0.5.4 and previous.
* - Fixed bug whereby list-based attributes, like pickletypeMike Bayer2009-06-151-2/+0
| | | | and PGArray, failed to be merged() properly.
* - Fixed another 0.5.4 bug whereby mutable attributes (i.e. PickleType)Mike Bayer2009-06-011-1/+3
| | | | | wouldn't be deserialized correctly when the whole object was serialized. [ticket:1426]
* - Removed all* O(N) scanning behavior from the flush() process,Mike Bayer2009-05-171-6/+18
| | | | | | | | | | | i.e. operations that were scanning the full session, including an extremely expensive one that was erroneously assuming primary key values were changing when this was not the case. * one edge case remains which may invoke a full scan, if an existing primary key attribute is modified to a new value.
* - Significant performance enhancements regarding Sessions/flush()Mike Bayer2009-05-171-0/+429
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().