Saturday, April 23, 2011

Re: django 1.1 performance versus django 1.2 performance

On Apr 23, 11:54 am, Torsten Bronger <bron...@physik.rwth-aachen.de>
wrote:
> Does anybody have estimates or figures concerning the impact of
> middleware?  I love the middleware framework and I make extensive
> use of it but sometimes I'm afraid it slows down every request
> significantly, especially if you have a project with cheap view
> functions.
>
> And then, the number of "canonical" middleware has increased between
> Django versions as far as I can see.

The performance impact of a middleware depends almost completely on
what a given middleware does. If I am not mistaken adding a middleware
that does nothing gives you just one function call per the
middleware's functions (process_request, process_view, ...) when
processing a request. If you do not have insane amounts of middlewares
defined then there should be no performance problems.

However, if you do something complex in the middleware then
performance will of course be affected.

In general I have a feeling that Django is still fast enough, and the
added features outweigh the performance penalty.

- Anssi

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate