Store a local cache containing the results of get_diff_files

Review Request #111 — Created July 11, 2007 and discarded — Latest diff uploaded

Information

Review Board SVN (deprecated)
trunk

Reviewers

Pages containing lots of comments end up calling get_diff_files many times. It's not nearly as expensive as it once was, since we now pass the particular filediff we care about, but we can do better. We now store a local cache so that future comments on the same page will reuse the results of the first comment for that file.

We're not storing this using cache_memoize because it's really not that expensive anymore to even call get_diff_files and we don't want to risk pushing more important things out of the cache. This is just a minor improvement on top of what we had.
Went to a page with several comments. Inserted some debug statements and saw that we weren't rebuilding the list on subsequent comments for the same file, but rather were pulling them out of the cache.
    Loading...