diff --git a/www/includes/install.inc b/www/includes/install.inc
index 5ace0bb..5c5520b 100644
--- a/www/includes/install.inc
+++ b/www/includes/install.inc
@@ -40,7 +40,7 @@ function drupal_load_updates() {
  */
 function drupal_get_schema_versions($module) {
   $updates = array();
-  $functions = get_defined_functions();
+  $functions = _drupal_get_update_functions();
   foreach ($functions['user'] as $function) {
     if (strpos($function, $module .'_update_') === 0) {
       $version = substr($function, strlen($module .'_update_'));
@@ -57,6 +57,26 @@ function drupal_get_schema_versions($module) {
 }
 
 /**
+ * Get a static list of candidate update functions.
+ * 
+ * This function gets a shortlist of possible update functions 
+ * avoiding having to iterate over every function name for every module.
+ */
+function _drupal_get_update_functions() {
+	static $update_functions = array();
+	if (count($update_functions)) {
+		return $update_functions;
+	}
+	$functions = get_defined_functions();
+	foreach ($functions['user'] as $function) {
+		if (strpos($function, '_update_') != 0) {
+			$update_functions[] = $function;
+		}
+	}
+	return $update_functions;
+}
+
+/**
  * Returns the currently installed schema version for a module.
  *
  * @param $module
