Re: [Zope-dev] Strange loop with ZCatalog

2004-02-13 Thread Casey Duncan
I already replied to this, but I never heard back from you.

What does the following return for a value:

len(list(context.TheCatalog.searchResults(Type='TypeTest')))

??

-Casey

On Fri, 13 Feb 2004 13:01:35 +0100
Pascal Samuzeau [EMAIL PROTECTED] wrote:

 Hi,   
   
 For some tests I have done :  
   
 - Create about 5000 folders under the Root Zope Site  
 - Inside those folders, I have created about 30 000 objects ( as  
 document, just an id, title and a Type).  
 - I've catalogued all inside a catalog named TheCatalog   
   
 I have written just this function, in intend to test my CPU ( that why
 I've written it like this):   
   
 allobject = context.TheCatalog.searchResults(Type='TypeTest') 
 l=len(allobject)  
 i = 0 
 #for i in range(len(allobject)):  
 for object in allobject:  
 #path = allobject[i].getPath()
 #course = allobject[i][0] 
 path = allobject.getPath()
 course = allobject[0] 
 thepath = string.split(path,'/')  
 lepath  = string.join(thepath[:-1],'/')   
 lieu=context.restrictedTraverse(lepath)   
 lieu.manage_delObjects(course)
 i+=1  
 return Len: %s and Number parsed: %s %(i,l) 
   
 Phase A:  
 I have 30 000 objects and the message following:  
 Len: 3 and Number parsed: 15001   
 In my catalog: 15000 object only were destroyed. !!!  
   
 Phase B:  
 I de-comment my comment lines, but I've got the same message. 
   
 I try to understand what it happens, but I can't. Anyone has a
 brillant idea?
   
 Sincerily 
 PS
 --
 Oreka ! Nous sommes l'internet moins cher !   
 Surfez 25% moins cher avec http://www.oreka.com   
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Strange loop with ZCatalog

2004-02-13 Thread Pascal Samuzeau
Hi,   
  
  
 I already replied to this, but I never heard back from you. 
  
I haven't seen your answer before, I'll search for it.
  
  
 What does the following return for a value: 
 
 len(list(context.TheCatalog.searchResults(Type='TypeTest')))
  
Just for now 62418.   
  
len (context.TheCatalog.searchResults(Type='TypeTest')) returns 62418 
too.  
  
Sincerily 
PS
--
Oreka ! Nous sommes l'internet moins cher !   
Surfez 25% moins cher avec http://www.oreka.com   

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Strange loop with ZCatalog

2004-02-13 Thread Casey Duncan
On Fri, 13 Feb 2004 16:14:05 +0100
Pascal Samuzeau [EMAIL PROTECTED] wrote:

 Hi,   
   
   
  I already replied to this, but I never heard back from you. 
   
 I haven't seen your answer before, I'll search for it.  

That's ok. I think there are inconsistencies in the loop code. In my
message I explained what didn't make sense to me.
   
  What does the following return for a value: 
  
  len(list(context.TheCatalog.searchResults(Type='TypeTest')))
   
 Just for now 62418.   
   
 len (context.TheCatalog.searchResults(Type='TypeTest')) returns 62418 
 too.

Good, so that means that len() of the result set isn't lying.

-Casey

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Strange loop with ZCatalog

2004-02-13 Thread Pascal Samuzeau
Hi Casey, 
  
Yes it doesn't lie at all, but i've tried till I suppress all and even
with 2 it suppressed only one.
  
Can you tell me more about your message, I haven't found it.  
  
Cheers
PS
--
Oreka ! Nous sommes l'internet moins cher !   
Surfez 25% moins cher avec http://www.oreka.com   

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Strange loop with ZCatalog

2004-02-13 Thread Casey Duncan
On Fri, 13 Feb 2004 19:10:07 +0100
Pascal Samuzeau [EMAIL PROTECTED] wrote:

 Hi Casey, 
   
 Yes it doesn't lie at all, but i've tried till I suppress all and even
 with 2 it suppressed only one.
   
 Can you tell me more about your message, I haven't found it.  

Bud, Google is your friend:

http://aspn.activestate.com/ASPN/Mail/Message/zope-List/1993758

-Casey

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )