diff --git a/skinr.module b/skinr.module
index 9d6a6ef316074398e2ce6c42993324496175054d..a19ffdeff381e798712def9ef078de792c831294 100644
--- a/skinr.module
+++ b/skinr.module
@@ -61,16 +61,22 @@ function skinr_cache_reset() {
  * @todo Account for Drupal's caching being enabled and make it work.
  */
 function skinr_preprocess(&$variables, $hook) {
+  $data = &drupal_static(__FUNCTION__);
+
   // Fix for update script.
   if ($hook == 'maintenance_page') {
     return;
   }
 
-  $current_theme = skinr_current_theme();
-  $skin_info = skinr_get_skin_info();
+  // Caching the data returned from the following functions is reported to
+  // improve performance.
+  if (!isset($data)) {
+    $data['current_theme'] = skinr_current_theme();
+    $data['skin_info'] = skinr_get_skin_info();
+    $data['theme_registry'] = theme_get_registry();
+  }
 
-  $theme_registry = theme_get_registry();
-  $original_hook = (isset($theme_registry[$hook]['original hook']) ? $theme_registry[$hook]['original hook'] : $hook);
+  $original_hook = (isset($data['theme_registry'][$hook]['original hook']) ? $data['theme_registry'][$hook]['original hook'] : $hook);
 
   // An array of $elements based on $module and $original_hook, derived from $variables.
   $array_elements = skinr_invoke_all('skinr_elements', $variables, $original_hook, 'preprocess');
@@ -84,7 +90,7 @@ function skinr_preprocess(&$variables, $hook) {
     // Get a list of skin configuration IDs to pass to
     // skinr_skin_load_multiple().
     $params = array(
-      'theme' => $current_theme,
+      'theme' => $data['current_theme'],
       'module' => $module,
       'element' => $elements,
       'status' => 1,
@@ -102,7 +108,7 @@ function skinr_preprocess(&$variables, $hook) {
     $context = array(
       'hook' => $hook,
       'variables' => &$variables,
-      'theme' => $current_theme,
+      'theme' => $data['current_theme'],
       'module' => $module,
       'elements' => $elements,
     );
@@ -122,8 +128,8 @@ function skinr_preprocess(&$variables, $hook) {
         }
 
         // Make sure this skin is enabled for the current theme.
-        if (isset($skin_info[$skin_name]['attached'])) {
-          $elements['#attached'] = $skin_info[$skin_name]['attached'];
+        if (isset($data['skin_info'][$skin_name]['attached'])) {
+          $elements['#attached'] = $data['skin_info'][$skin_name]['attached'];
           drupal_process_attached($elements);
         }
 
@@ -131,8 +137,8 @@ function skinr_preprocess(&$variables, $hook) {
           $skin_options = array($skin_options);
         }
         foreach ($skin_options as $skin_option) {
-          if (isset($skin_info[$skin_name]['options'][$skin_option]['attached'])) {
-            $elements['#attached'] = $skin_info[$skin_name]['options'][$skin_option]['attached'];
+          if (isset($data['skin_info'][$skin_name]['options'][$skin_option]['attached'])) {
+            $elements['#attached'] = $data['skin_info'][$skin_name]['options'][$skin_option]['attached'];
             drupal_process_attached($elements);
           }
         }
