Florent Guillaume wrote:
That's certainly a good hack. There are several ways to do it, either
with a thread-local variable, or in the request, or by walking the
stack's locals to check for a __dont_index__ attribute... You'd have to
bench, but a thread-local variable is probably the fastest. You want to
store a set of objects whose indexing should be skipped.
Urm? Surely it's the other way round? ie: you build a mapping of objects
that need re-indexing, so you only re-index each one once...
As Julien said it's not very hard to implement, it's just that there are
application changes to consider. Still, there's agreement that CMF
should move in that direction, I can provide patches taken from the CPS
implementation. (And it requires Zope 2.8/ZODB 3.4 of course.) Some of
the framework should pushed into Zope itself.
I think this is the way to go, but I do feel there should be some
override method for unit testing and als ofor where you want to do a
search after doing a load of object changes....
Simplistix - Content Management, Zope & Python Consulting
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests