On Thu, 2011-01-27 at 12:17 -0800, Seth wrote:
> Thanks Chris, it works fine in a NewRequest event.
> 
> 
> 
> 
> This does bring up a minor side-question about events though: Is it
> better for there to be only one event call per event type, or does it
> matter if there are multiple?
> 
> 
> For example, in my __init__.py I'm using:
> 
> 
> config.add_subscriber(add_db_connection, NewRequest)
> config.add_subscriber(add_identity, NewRequest)
> config.add_subscriber(add_renderer_globals, BeforeRender)
> 
> 
> Is Pyramid more efficient if I combine both those NewRequest
> subscribers into one subscriber call, or does it matter?

Slightly more efficient to have only one subscriber but likely not worth
worrying about unless there are ordering requirements (subscribers are
not guaranteed to be called in any particular order).

- C


> 
> 
> Seth
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "pylons-devel" group.
> To post to this group, send email to pylons-devel@googlegroups.com.
> To unsubscribe from this group, send email to pylons-devel
> +unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-devel?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to