Improve diff performance

Review Request #215 — Created Jan. 29, 2008 and submitted

Information

Review Board SVN (deprecated)

Reviewers

On very large files, reviewboard takes a long time to display the diff.  I narrowed down one of the biggest offenders was the call to map(diff_line,...) in get_chunks.  This creates a differ object and runs the diff algorithm on every line of a file (if you have tens of thousands of lines, that can take a long time).  I'm pretty certain this change is safe, though I'm not entirely familiar with the code.  This makes things come up at least twice as fast for me.
Viewed some diffs, including inter-line changes, added and removed files, and side-by-side looks the same without this change.
chipx86
  1. This looks safe, and looks like a great optimization. Excellent work, thanks!
  2.