Index: diff.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/Attic/diff.pages.inc,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 diff.pages.inc
--- diff.pages.inc	12 Aug 2010 16:34:08 -0000	1.1.2.9
+++ diff.pages.inc	28 Sep 2010 21:06:40 -0000
@@ -245,6 +245,16 @@ function diff_diffs_show($node, $old_vid
  */
 function _diff_body_rows($old_node, $new_node) {
   drupal_add_css(drupal_get_path('module', 'diff') .'/diff.css', 'module', 'all', FALSE);
+
+  // cache the result rows from the diff as it's time consuming
+  $cid = 'diff_'. $old_node->vid .'_'. $new_node->vid;
+
+  $cache = cache_get($cid);
+  if ($cache && $cache->data) {
+    return $cache->data;
+  }
+
+  // no cache, do diff
   module_load_include('inc', 'diff', 'includes/node');
   if (module_exists('taxonomy')) {
     module_load_include('inc', 'diff', 'includes/taxonomy');
@@ -308,6 +318,10 @@ function _diff_body_rows($old_node, $new
       array('data' => ''),
     );
   }
+
+  // save result to cache
+  cache_set($cid, $rows);
+  
   return $rows;
 }
 
