summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/identity.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-2/+2
| | | | | a consistent tag - AUTHORS file
* - another heap of inlinings and now I really have to be done with thisMike Bayer2010-12-211-5/+12
|
* - remove the need to use LoadDeferredColumns, LoadLazyAttribute in most cases,Mike Bayer2010-12-161-10/+21
| | | | | | | | | these are back to being part of LoaderStrategy - simplify attribute.get() - inline the dict get inside of attribute.__get__() - revert some memoized attrs from InstanceState which are called in almost all cases regardless - inlining
* - inliningsMike Bayer2010-12-161-5/+4
| | | | - in particular, mapper.primary_key is a tuple now
* - Added a mutex to the identity map which mutexesMike Bayer2010-09-071-28/+49
| | | | | | | | remove operations against iteration methods, which now pre-buffer before returning an iterable. This because asyncrhonous gc can remove items via the gc thread at any time. [ticket:1891]
* - For those who might use debug logging onMike Bayer2010-02-131-1/+3
| | | | | | | | | | sqlalchemy.orm.strategies, most logging calls during row loading have been removed. These were never very helpful and cluttered up the code. - Some internal streamlining of object loading grants a small speedup for large results, estimates are around 10-15%.
* remove needless check_modified()Mike Bayer2010-01-071-1/+1
|
* gratuitous try/except/else usageMike Bayer2009-10-181-1/+2
|
* dohMike Bayer2009-08-311-1/+1
|
* - Fixed incorrect exception raise inMike Bayer2009-08-311-5/+9
| | | | | Weak/StrongIdentityMap.add() [ticket:1506]
* - renamed PASSIVE_NORESULT to PASSIVE_NO_RESULTMike Bayer2009-08-071-3/+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-8/+27
|
* Guard against a gc hitting during the sweep for dirty objects.Jason Kirtland2009-07-161-4/+5
|
* - Removed all* O(N) scanning behavior from the flush() process,Mike Bayer2009-05-171-15/+16
| | | | | | | | | | | 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-61/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* - Generalized the IdentityManagedState._instance_dict() callableMike Bayer2009-01-051-7/+5
| | | | | | | to the IdentityMap class so that Weak/StrongInstanceDict both have the same behavior wrt the state referencing the map - Fixed bug when using weak_instance_map=False where modified events would not be intercepted for a flush(). [ticket:1272]
* - converted some more attributes to @memoized_property in expressionsMike Bayer2008-11-101-8/+9
| | | | | - flattened an unnecessary KeyError in identity.py - memoized the default list of mapper properties queried in MapperEntity.setup_context
* - Improved weakref identity map memory management to no longerMike Bayer2008-10-191-43/+46
| | | | | require mutexing, resurrects garbage collected instance on a lazy basis for an InstanceState with pending changes.
* - identity_map._mutable_attrs is a plain dict since we manage weakref ↵Mike Bayer2008-10-021-2/+2
| | | | | | removal explicitly - call list() around iteration of _mutable_attrs to guard against async gc.collect() while check_modified() is running
* Updated some todos.Jason Kirtland2008-05-211-1/+0
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-0/+250
0.4 development continues at /sqlalchemy/branches/rel_0_4