Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.475
diff -u -p -r1.475 taxonomy.module
--- modules/taxonomy/taxonomy.module	27 May 2009 18:34:01 -0000	1.475
+++ modules/taxonomy/taxonomy.module	2 Jun 2009 22:26:16 -0000
@@ -1271,6 +1271,15 @@ function taxonomy_vocabulary_load_multip
  *   Results are statically cached.
  */
 function taxonomy_vocabulary_load($vid) {
+
+  // This function can be called many times on the same single vocabulary when
+  // terms are displayed, due to hook_term_path(). When that's the case there is
+  // less overhead to load the vocabulary directly from the static cache
+  // compared to calling taxonomy_vocabulary_load_multiple().
+  $vocabularies = drupal_static('taxonomy_vocabulary_load_multiple');
+  if (isset($vocabularies[$vid])) {
+    return $vocabularies[$vid];
+  }
   return reset(taxonomy_vocabulary_load_multiple(array($vid), array()));
 }
 
