HN2new | past | comments | ask | show | jobs | submitlogin
Optimizing Django: tricks for faster page loads (turnkeylinux.org)
53 points by alonswartz on May 4, 2010 | hide | past | favorite | 11 comments


This is not optimizing django.

This is use django-compress to bundle your js and css to have fewer HTTP requests and use HTTP expire headers for longer client-side caching.


Any good material/resource for optimizing django? If you know any.. Learning it for a while now...



http://docs.djangoproject.com/en/dev/topics/cache/

and check ur pages to make sure ORM isnt making ridiculous querys

edit: also use PNGCrush on ur PNGs if you made them with Adobe: http://sourceforge.net/projects/pmt/files/


Thank You, good Sir.


This blog article gives a good illustration of why I built InstaCDN. Getting your js/css/image assets combined, minified, gzipped and served from a CDN is tedious and error prone.

The article describes how to install some prerequisite minification software and perform series of configuration steps that span python, html, apache/lighttpd. It seems likely that his instructions will provide improved performance, but there's no CDN integration, some configuration details are left up to the reader to puzzle out and the comments already include some "gotchas" from real world configuration interactions.

InstaCDN is an alternative approach that does all the right stuff through a trivial REST API.

Would love some feedback, and to find out if/how it's breaking any of your complex css/js.

http://www.instacdn.com/


Seems nice, but I would try just to see it working and then give up. You have bills and it's a free service... Not having any kind of paid plan or income strategy makes you look suspicious.


It's just a side project right now. And amazon cloudfront is amazingly inexpensive. It would take a lot of adoption before I would need to start charging anyone.


While I have not used it myself (my projects are either internal or rather write-heavy), I heard a lot of good things about Cache Machine[1] (which is used in Mozilla Addons) and Johnny Cache[2]. Both provides automatic caching and invalidation of Django model.

  [1]: http://github.com/jbalogh/django-cache-machine
  [2]: http://packages.python.org/johnny-cache/


Could be handy with Google App Engine. Other than that, doesn't seem extraordinarily "optimizing"


While the versioning looks useful, for CSS/javascript compression I'm interested in knowing if most people use a language framework or if they configure the web server to do it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: