diff --git a/skinr.module b/skinr.module
index eef2dd0..b3ca08d 100644
--- a/skinr.module
+++ b/skinr.module
@@ -61,15 +61,23 @@ function skinr_cache_reset() {
  * @todo Account for Drupal's caching being enabled and make it work.
  */
 function skinr_preprocess(&$variables, $hook) {
+  static $already_called = FALSE;
+  static $skinr_info;
+  static $current_theme;
+  static $theme_registry;
+
   // Fix for update script.
   if ($hook == 'maintenance_page') {
     return;
   }
 
-  $current_theme = skinr_current_theme();
-  $skin_info = skinr_get_skin_info();
+  if (!$already_called) {
+    $called = TRUE;
+    $current_theme = skinr_current_theme();
+    $skin_info = skinr_get_skin_info();
+    $theme_registry = theme_get_registry();
+  }
 
-  $theme_registry = theme_get_registry();
   $original_hook = (isset($theme_registry[$hook]['original hook']) ? $theme_registry[$hook]['original hook'] : $hook);
 
   // An array of $elements based on $module and $original_hook, derived from $variables.
