|
|
Django ORM performance patchI made a patch for Django to add WebAlchemy vs StaticGeneratorWhen two months ago I published WebAlchemy code, several people asked me how to make it working with nginx or lighttpd. Yesterday new tool similar to WebAlchemy StaticGenerator was published. Now it seems right time to explain how to use WebAlchemy with nginx and other servers that don't have Improved Mathematical CaptchaA week ago I published Mathematical CaptchaWhen spam bots started to post comments in my blog every day I realized that I need some kind of simple anti-spam protection. I didn't saw yet real anti-spam AI and don't like image captchas. I looked for a mathematical captcha where human is asked to solve a simple mathematical calculation like 3+5=?. Unfortunately I didn't found open-source implementation and write own Autogenerated ToCWhen I reread my last blog post "WebAlchemy accelerates Django in 100 times" I realized that I wrote too many letters. So to make navigation easy I created simple template filter that extracts from a text ids, replaces '_' with spaces and produces hyperlinked Table of Contents. WebAlchemy accelerates Django in 100 timesWith WebAlchemy only pages involved in form processing are served directly by Django, the rest of the pages most of the time are served directly by Apache as static content with static content speed. In other words for Django-powered site it's possible to achieve speed about 2000 request/sec, against about 500 request/sec with memcached and about 20 request/sec for "typical" (10 fast SQL queries) page without caching at all. Actual performance results of course will vary from server/application/configuration. Django profilerdjango-profile.py allows to analyze any django projects, i.e. to find number of SQL queries used on each page and print common SQL-usage report. Hello worldI launch the second version of my personal site that is usually called now blog. I get many from the world of open-source and I often feel that I have to give something back to community. |
|
| [about | blog | projects]
© Dima Dogadaylo |
|