[Zope-CMF] cmf zpt_generic/search - sequence_length is very slow
for large collections, len () is much faster.
Henryk Paluch
hpaluch at gitus.cz
Thu Dec 23 09:38:12 EST 2004
Hi!
>batch_obj.sequence_length returns the length of all the results.
>
>len(batch_obj) returns only the length of the current batch slice.
>Code is in ZTUtils/Batch.py
>
>
Agreed, but I do
len(items) but not len(batch_obj) :
items = ctool.searchResults(kw)
batch_obj = Batch(items, 25, b_start, orphan=1)
length = batch_obj.sequence_length
### my guess: len(items)==batch_obj.sequence_length
### - but len(items) is much faster.
Is it right?
--
---(c)--------------------------------------------------
GITUS, s.r.o. Spitalska 2a, 190 00 Praha 9, CZ
Henryk Paluch - analytik/programator
mailto: hpaluch at gitus.cz http://www.gitus.cz
--------------------------------------------------------
More information about the Zope-CMF
mailing list