Ramblings

April 17, 2008

Reduce Django facebook server load

Filed under: dev, django, facebook, python, tip — michaelangela @ 2:09 am

So say you have a Facebook app and it runs on Django. Standard practice is to load the middleware. Middleware by default adds a bit of overhead. It’s needed for some bits but completely unnecessary for anything that doesn’t need it. This is one way to take it out if you feel the need for the extra speed. I wonder how much performance suffers for the bits that don’t need the middleware?

Using PyFacebook without the Facebook middleware

Recently I have been experimenting with using PyFacebook to create a Facebook app. In the early stages of development I ran into a bit of a quandry: how to you use PyFacebook with Django, without using the PyFacebook middleware?

This is not an inrrelevant question, because the PyFacebook
middleware is just bloat for any views being loaded that do not
directly communicate with Facebook, and is even inappropriate for some
views that do communicate directly with Facebook (requests made with
the FBJSM Ajax object).

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: