[ZODB-Dev] Speeding up ZODB (was "redis cache for RelStorage")

Shane Hathaway shane at hathawaymix.org
Fri May 6 17:46:03 EDT 2011


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 
"app._p_jar.activate_all(my_objects)".

Shane


More information about the ZODB-Dev mailing list