[ZODB-Dev] Savepoints are invalidated once they are used
Tim Peters
tim at zope.com
Tue Jul 12 11:53:25 EDT 2005
[Jeremy Hylton]
> I understand. The further invariant is that the index captured when a
> savepoint created is immutable.
Or at least acts like it. Copying is an easy-to-code and effective way to
ensure that, and I don't know of a better feasible way. Capturing a lot of
savepoints (or doing a lot of commit(True)) while modifying a lot of objects
makes for a lot of index copying, though, effectively injecting an O(N**2)
time drag (even if rollback/abort(True) is never done).
A "copy on modify" flavor of dict could do much better. Since I'm sure
Google could also make good use of that, I expect to see a patch on the
Python tracker from you implementing that by the end of this weekend <wink>.
More information about the ZODB-Dev
mailing list