Switch to using the cached template loader.

Review Request #4165 — Created May 25, 2013 and submitted

Information

Review Board
release-1.7.x

Reviewers

Switch to using the cached template loader.

The cached template loader will cache the path to a template, given a
template name. Unlike the standard loaders, which will search every
location every time, this will only search the location once per thread.

This is not a memcached-based solution, but rather local memory, so
every thread will start with a fresh cache.

In my tests, this sped up the dashboard and review request pages by
~100-120ms, after the first load.
Went around various pages as both a logged in user and logged out user.
Didn't see any stale templates. It doesn't look like that would happen
anyway, though, given the code.

Biggest problem we may run into is with extension templates changing,
but that will be fixed in Djblets.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.7.x (746c26a)
Loading...