Re: [Zope-dev] Question about 'The Zope Developer's Guide'

2003-11-07 Thread J. Cameron Cooper
Baby Zope wrote:

I have tried to find 'The Zope Developer's Guide' without lucky. Could 
you give me a location to download it?
You mean the one that's linked to on every page of Zope.org?

 --jcc

--
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."


___
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] KeywordIndex performance / multiunion

2003-11-07 Thread Seb Bacon
Casey Duncan wrote:

This time may be caused by fetching from the database. If so, then the
> only way to speed it up is increase the ZODB cache or get faster disks.
> Try the former and see if it helps. 
 Upping the cache speeds it up to something sane. 
 However, I don't understand why. 
These are TreeSets most likely. The actual members of the sets are stored in 
> separate persistent objects.

But of course :-)

Thanks,

seb

___
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] object copy

2003-11-07 Thread Paul Winkler
On Fri, Nov 07, 2003 at 12:20:13PM +0100, Dmitrij Repp wrote:
> Hi,
> how can I to copy of objects beetwen Folders with python?

http://www.zopelabs.com/cookbook/1037768468

such questions are probably better suited for the main zope list,
[EMAIL PROTECTED] This list is for development of zope itself,
not developing applications with zope.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's GARBAGE MAN EXO SMOOTHIE!
(random hero from isometric.spaceninja.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] OR

2003-11-07 Thread Andreas Jung
Your question does not make sense.

-aj

--On Freitag, 7. November 2003 14:20 Uhr +0100 Dmitrij Repp 
<[EMAIL PROTECTED]> wrote:

or how can I with python a other PythonScript make?

__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de
___
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 )


[Zope-dev] OR

2003-11-07 Thread Dmitrij Repp
or how can I with python a other PythonScript make?

__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

___
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] KeywordIndex performance / multiunion

2003-11-07 Thread Casey Duncan
On Fri, 07 Nov 2003 12:02:07 +
Seb Bacon <[EMAIL PROTECTED]> wrote:

> Casey Duncan wrote:
> > On Thu, 06 Nov 2003 19:11:55 +
> > Seb Bacon <[EMAIL PROTECTED]> wrote:
> >>A simple query for ["A" or "B" or "C"] against a KeywordIndex containing 
> >>27k objects is taking about 7 seconds on a Celeron 1.6Ghz, which seems 
> >>an absurdly long time to me.
> > 
> > 
> > This time may be caused by fetching from the database. If so, then the
>  > only way to speed it up is increase the ZODB cache or get faster disks.
>  > Try the former and see if it helps. 
> 
> Yup, absolutely right.  Upping the cache speeds it up to something sane. 
>   However, I don't understand why.  The code does something like:
> 
>   set1 = self.index.get(1)
>   set2 = self.index.get(2)
>   sets = [set1, set2]
> 
> ...so the sets will have come from the ZODB.  But the bit which takes 
> the time is the following line:

These are TreeSets most likely. The actual members of the sets are stored in separate 
persistent objects. This is done so that large sets can be fetched in chunks rather 
than all at once.

The ZODB tries to be lazy with fetching objects. If an object is very large it often 
makes sense to split it up between many persistent objects so that each part can be 
loaded and unloaded separately. This is what BTrees and TreeSets do. When you fetch a 
value from a BTree or test for an element in a set it only needs to load the part (in 
this case a Bucket) that contains the element, rather than the whole enchilada which 
could be huge (in reality its not quite that simple, but that's the general idea).

This is why BTrees and TreeSets are used when you need to store and manipulate 
arbitarily large numbers of elements.

>   result = multiunion(sets)

This iterates the sets which loads all the buckets from the database if they are not 
in the cache.
 
> At which point the sets have already been fetched, no?
> 
> looking forward to the day I understand ZODB caches...;-)

Actually this is not so much a function of the cache but a function of the 
organization of the set objects themselves.

-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] KeywordIndex performance / multiunion

2003-11-07 Thread Seb Bacon
Casey Duncan wrote:
On Thu, 06 Nov 2003 19:11:55 +
Seb Bacon <[EMAIL PROTECTED]> wrote:
A simple query for ["A" or "B" or "C"] against a KeywordIndex containing 
27k objects is taking about 7 seconds on a Celeron 1.6Ghz, which seems 
an absurdly long time to me.

This time may be caused by fetching from the database. If so, then the
> only way to speed it up is increase the ZODB cache or get faster disks.
> Try the former and see if it helps. 
Yup, absolutely right.  Upping the cache speeds it up to something sane. 
 However, I don't understand why.  The code does something like:

 set1 = self.index.get(1)
 set2 = self.index.get(2)
 sets = [set1, set2]
...so the sets will have come from the ZODB.  But the bit which takes 
the time is the following line:

 result = multiunion(sets)

At which point the sets have already been fetched, no?

looking forward to the day I understand ZODB caches...;-)

seb



___
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] KeywordIndex performance / multiunion

2003-11-07 Thread Seb Bacon
Tim Peters wrote:
[Seb Bacon]

But main the reason I'm posting is to wonder if there any reason not
to use the multiunion operator instead of the union operator in
UnIndex.py... it should be faster, right?  It seems a touch faster in
some informal tests.


[Casey Duncan]

Yes, it probably should be used. I think it is much faster when
unioning very small and very large sets as well. Tim would know
better, tho.


time.clock() knows best .
I asked time.clock(), and it says the difference between union and 
multiunion is not statistically significant in my scenario (7 sets of 
27k catalog data record ids, with about 25k in the intersection of all 7).

So I'm not going to bother changing this in UnIndex.

Seb



___
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] object copy

2003-11-07 Thread Dmitrij Repp
Hi,
how can I to copy of objects beetwen Folders with python?

__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

___
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 )