[Erp5-dev] getMovementIndex

Yoshinori Okuji yo at nexedi.com
Tue May 24 14:38:08 CEST 2005


On Tuesday 24 May 2005 13:17, Sebastien Robin wrote:
> So I guess it might be very time consuming to maintain it, I think a good
> optimization would be placed directly on recursiveImmediateReindexObject,
> and it will benefits everywhere in ERP5 (if it is not already done).

Possibly. But it is not very easy to do that.

The Right Thing to do is to use catalogObjectList of portal_catalog. But this 
method assumes that all objects are indexed from scratch, that is, no update 
or no conflict occurs. So it is necessary to modify catalogObjectList so that 
it can update objects (probably delete and insert), and can deal with uid 
duplications (like catalogObject). This will make it somewhat slower, so I 
don't like this very much.

One way to avoid that performance loss is to add a parameter which says if 
SQLCatalog should make sanity checks. This is feasible, but this will still 
make it a bit slower, because we must add a dtml conditional into each Z SQL 
Method, like this:

<dtml-if delete_before_insert>
DELETE FROM catalog WHERE ...
</dtml-if>

YO
-- 
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com



More information about the Erp5-dev mailing list