On May 30, 2010, at 12:41 AM, Krishnakant Mane wrote:

> I am particularly interested to know about the performance bennifits.

It's slightly faster, how much so varies on templates used, etc. Here are some 
of the specific performance improvements:

- url instead of url_for. url_for used a singleton global instance it always 
looked up to see the current environment, while url is an instance of an object 
that holds the reference to environ to avoid global lookups

- CacheMiddleware no longer is running for every request, it never did much 
anyways, except attach a cache object. This object is now instead directly on 
app_globals by default, so that's one less piece of middleware

- Latest Routes can run its middleware without using the rather hackish 
singleton, which was not as performant. This is now enabled by default in new 
Pylons projects with the singleton option, ie.
    app = RoutesMiddleware(app, config['routes.map'], singleton=False)

In the grand scheme of things, this could be a 1% improvement, or even a 5% 
improvement depending on how often url's are generated, etc.

Cheers,
Ben

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

Reply via email to