-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I did some optimizations for the CPS indexation mecanism :

Repository objects are not indexed anymore :
- --------------------------------------------

   o half of the indexations avoided
   o catalog is lighted big time

Single indexation per object per transaction :
- ---------------------------------------------

When, during the same transaction, an object was modified several times
or were following several workflow transitions or even saw its security
configuration updated a reindexation occured for each case.

It's was of course bad and *really* costly for nothing. (Of course, it
was a visible a problem only on huge CPS instances with lots of objects
indexed or with an external catalog.

A pre transaction commit hook has been added to the ZODB Transaction
supporting subscribers registration. Each subscriber has a commit()
method called just *before* the first commit phase that contains the
actual code to execute and an abort() method called at the beginning of
the abort() method of the transaction class.

Pre-commit hook definition with subscribers :

http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/CPS3/CPSCore/PatchZODB.py

Subscriber definition :

http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/CPS3/CPSCore/TransactionCommitSubscribers.py?rev=1.1&view=auto

Subscriber interface :

http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/CPS3/CPSCore/interfaces/ITransactionCommitSubscriber.py?rev=1.1&view=auto

You may register your own subscribers by implementing the interface
above and register them to the list of pre-commit transaction subscribers.

This is checked in and available in the HEAD of CPSCore.

Note that the extensions currently defined within CPSCore will disapear
with ZODB >= 3.3 because a support pre-commit hook will be there. But
since Zope-2.7.x uses ZODB-3.2 we need to deal with...

For those interested about the topic currently running threads :

 -  http://mail.zope.org/pipermail/zope-dev/2005-April/024566.html
 -  http://mail.zope.org/pipermail/zodb-dev/2005-April/008661.html
 -  http://mail.zope.org/pipermail/zodb-dev/2005-April/008667.html

Cheers,

        J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Plateform : http://www.cps-project.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCUW/fGhoG8MxZ/pIRAhshAJ4nyFxhn5AvfORR5F+LFsOPSyJKkQCfV/Kk
QVqP42IxaTKi6F9dVEmE/Ug=
=svcw
-----END PGP SIGNATURE-----
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to