Add logging and timer around pygments.highlight call when generating diffs.

Review Request #2180 — Created March 3, 2011 and discarded


Review Board


We've seen a few cases where pygments spins forever and never returns.  After looking at our logs, 5 seconds was about the longest it was taking to highlight anything so I put the timer at 10 seconds.
Our review board instance has been running with this patch for a few weeks now.  
  1. Pushed to release-1.5.x as 69807c1. Thanks!
  1. Sorry, I'm reverting this.
    This breaks Windows (signal APIs aren't available), has broken highlighting on one Linux systems, and from what I can tell by the Python docs, it's not safe to use in various web servers/threading models.
    I don't know what a better solution is, but we'll need to find a more reliable solution.