[BlueBream] [Zope-dev] pagination in bluebream
hedleyroos at gmail.com
Fri Aug 12 10:40:06 EDT 2011
> I found z3c.batching package that does this. For this to work it needs
> the full list. IMHO, loading the entire list of objects on to the memory
> doesn't seem to be a good choice.
The catalog returns an iterator for a set of lazy objects (aka brains
- think of them as pointers). This means that the whole set is not
loaded into memory. The efficiency is two-fold.
1. The set is only "woken up" when you need to access a brain in the set.
2. The brain itself is then retrieved from the catalog.
And then you can of course fetch the real object that is represented
by the brain by doing getObject (assuming zope.catalog has the same
API as ZCatalog).
My comments are valid for Zope2 but should hold for Bluebream.
More information about the bluebream