I've discovered the following - When you delete objects, the default delete
handler will help you by updating the metadata and type search indexes. This
is nice... except when you have a CFLOOP that deletes a BUNCH of objects.
contentObjectDelete does NOT pass all objects to the delete handler, rather
it passes them in one at a time. If your Verity collections are optimized,
this means that deletion can be EXTREMELY slow. On my system, deleting 10
objects took 6 minutes.

Below is a modified version of the default handler. When I want to delete
objects that I know don't exist in the collections, I simply pass in
NoUpdate. When I'm deleting a bunch of objects that CAN exist, I simply do
my own typeIndexUpdate and pass in a list of the objects I deleted.

Anyway, enjoy:

Oh! By the way, I also added bEnableDesignMode=False. For some reason, when
I deleted objects I was getting empty grapples. Not sure why.

<CFA_Handler Object="object" bEnableDesignMode=False>

        <cftry>

        <CFIF NOT IsDefined("Attributes.stParams.NoUpdate") OR NOT
Attributes.stParams.NoUpdate>

                <!--- Update the metadata collection --->
                <CFA_MetaDataIndexDelete DataSource="#Attributes.DataSource#"
lObjectIDs="#Object.objectID#">

                <!--- Update the TypeSearch collection --->
                <CFA_TypeIndexKeyDelete DataSource="#Attributes.DataSource#"
TypeID="#Object.typeID#" lObjectIDs="#Object.ObjectID#">

                <cfcatch type="any">
                <!--- this should log the error without surfacing it to the user --->
                </cfcatch>
        </CFIF>

        </cftry>


</CFA_Handler>



=======================================================================
Raymond Camden, Cold Fusion Jedi Master for Syntegra (www.syntegra.com)
Allaire Certified Instructor and Member of Team Allaire

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to