Below you will find resources from my presentation on High Performance Django.
- Slides
- Profiling Middleware
- Template Engine Benchmarks: Real-world Example, Benchmark Testcase
Below you will find resources from my presentation on High Performance Django.
8 Responses to "High Performance Django"
What is it that makes jinja so much faster than djangos builtin template engine? Cant the built in by improved to perform better performence??
I can’t really say what makes it faster, except that it does use some ctypes, and in Jinja2 it compiles down to a module which is really nice.
Did Curse switch to Jinja? Were templates a major bottleneck?
I wouldn’t say they were a major bottleneck, but yes, Curse was using Jinja. It was mostly because of the flexibility Jinja offers over Django.
I have just migrated the user home page of mixin.com (http://www.mixin.com/users/ndengler/) from django to jinja2 on our test environment. The time used for rendering the template shrunk from ~1000ms to ~400ms (which is still to much). It’s more than 2 times faster and we are planning to migrate our complete application on jinja2. I wish I knew jinja2 before!
I'm personally very interested in SCGI as an alternative to FastCGI. SCGI is a much simpler protocol (but with the same theoretical performance benefits) and was originally designed for use with Quixote, another Python framework. It's getting quite a bit of interest in the Rails community at the moment.
I’m starting a project fairly soon and trying to decide between Django and PHP (sort of off topic)… but I have doubts for choosing django… For starters, I don’t know if it’s ‘economical’ to choose django in terms of performance. Does django beat pure php in complex sites pageviews? In other words, do I have to scale faster with django then with php? Will I be able to find additional programmers if my website becomes a success? I live in Europe and I don’t have the impression django/python developers are common here (prove me wrong!). How is the support going to be? I’m always surprised to see very old php4 code runs fine on the newest php5 release, but I heard djando changes quite often and you have to re-write code if you want to use a newer release. Meh.
How much faster is nginx on serving content from memcached than static files?
I believe OS like linux and *bsd caches frequently requested files in ram. Though you could garantuee that from memcached its always in memory but how about tcp latency? Does nginx connec to the memcached on every request?
Leave A Reply