[Cubicweb] massive deletion performance

Sylvain Thénault sylvain.thenault at logilab.fr
Mon Jan 17 18:59:58 CET 2011


On 17 janvier 18:55, Alexandre Fayolle wrote:
> Q1: will I break anything if I call delete all the entities I want to delete 
> before calling the after_delete_entity hooks for all the entities?

probably not.
 
> Assuming the answer is No, I will need to change source/native.py to allow 
> delete_entity (or a variant of that method) to delete more than one entity. 
> Changing the SQL is easy, but I'm a bit lost by the with self._storage_handler 
> bits. 
> 
> Q2: is the _storage_handler context manager only useful for the 
> undoable_action support? If no, what does this piece of code do in the context 
> of delete_entity?

see cubicweb.server.sources.storage

-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org




More information about the Cubicweb mailing list