Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.891
diff -u -p -r1.891 common.inc
--- includes/common.inc	3 May 2009 08:12:12 -0000	1.891
+++ includes/common.inc	4 May 2009 09:29:23 -0000
@@ -1544,7 +1544,9 @@ function format_interval($timestamp, $gr
  *   A translated date string in the requested format.
  */
 function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) {
+  static $dates = array();
   static $timezones = array();
+
   if (!isset($timezone)) {
     global $user;
     if (variable_get('configurable_timezones', 1) && $user->uid && $user->timezone) {
@@ -1575,6 +1577,10 @@ function format_date($timestamp, $type =
       $format = variable_get('date_format_medium', 'D, m/d/Y - H:i');
   }
 
+  if (isset($dates[$timestamp][$type][$format][$timezone][$langcode])) {
+    return $dates[$timestamp][$type][$format][$timezone][$langcode];
+  }
+
   $max = strlen($format);
   $date = '';
   // Create a DateTime object from the timestamp.
@@ -1606,6 +1612,7 @@ function format_date($timestamp, $type =
       $date .= $c;
     }
   }
+  $dates[$timestamp][$type][$format][$timezone][$langcode]= $date;
 
   return $date;
 }
