? .cache
? .settings
Index: modules/field/field.info.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.info.inc,v
retrieving revision 1.37
diff -u -p -r1.37 field.info.inc
--- modules/field/field.info.inc	13 Jan 2010 04:37:03 -0000	1.37
+++ modules/field/field.info.inc	4 Feb 2010 22:25:55 -0000
@@ -65,9 +65,12 @@ function field_info_cache_clear() {
  *     as well as module, giving the module that exposes the entity type.
  */
 function _field_info_collate_types($reset = FALSE) {
-  static $info;
-
-  // @TODO use entity_get_info().
+  // Use the advanced drupal_static() pattern, since this is called very often.
+  static $drupal_static_fast;
+  if (!isset($drupal_static_fast)) {
+    $drupal_static_fast['_field_info_collate_types'] = &drupal_static(__FUNCTION__);
+  }
+  $info = &$drupal_static_fast['_field_info_collate_types'];
 
   if ($reset) {
     $info = NULL;
@@ -172,7 +175,12 @@ function _field_info_collate_types($rese
  *     name and field name. This entry only lists non-deleted instances.
  */
 function _field_info_collate_fields($reset = FALSE) {
-  static $info;
+  // Use the advanced drupal_static() pattern, since this is called very often.
+  static $drupal_static_fast;
+  if (!isset($drupal_static_fast)) {
+    $drupal_static_fast['_field_info_collate_fields'] = &drupal_static(__FUNCTION__);
+  }
+  $info = &$drupal_static_fast['_field_info_collate_fields'];
 
   if ($reset) {
     $info = NULL;
