On 05/06/2011 02:14 PM, Shane Hathaway wrote:
> However, there is a different class of problems that prefetching could
> help solve.  Let's say you have pages with a lot of little pieces on it,
> such as a comment page with a profile image for every comment.  It would
> be useful to tell ZODB to load all of the objects in a list before
> accessing them.  For example:
>       app._p_jar.load_all(comments)
>       app._p_jar.load_all([comment.profile for comment in comments])

FWIW, a better API name would be "activate_all".  Code would look like 

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to