ridethepony/django-fiber — pull request #132 by markotibold (2012-10-25 21:27:18+00:00)
Title: Performance improvements

Upon every request Fiber calls FiberPageMixin.get_fiber_page() up to 9 times, which in turn needs to call PageManager.get_by_url(). The last one is a rather heavy method.

By caching the current page, we can win quiete some performance.

While testing with hotshot, the cpu time required for handling the request took aboout 900 ms using the latest dev-version of Fiber. With these improvements the time is reduced to about 100 ms. (For the specific project I'm working with)

This pull req also includes some tests for FiberPageMixin which was still uncovered. And makes some names in the mixins module shorter to improve readability.

Note that some commits were also already in the somewhat underspecified (my bad) pull req at #120.

I used this middleware [snippet](http://djangosnippets.org/snippets/186/) for timing.