Question: Our new D7 site was running very slowly so I did some profiling with devel/xhprof and found that D7 was doing millions of preg\_grep function calls within drupal\_find\_theme\_functions() in theme.inc. This happened on every page load.

It's my understanding that the drupal\_find\_theme\_functions function should only be called when the theme registry is being rebuilt - am I correct in that?

I made sure that "rebuild theme registry" was off in devel, and then disabled devel entirely. However, I'm still seeing those millions of function calls to preg\_grep in drupal\_find\_theme\_functions on every page load (I added a piece of code to theme.inc to log when the function was called).

We're using a theme based on Omega and if we are rebuilding the theme registry each time I'm not seeing how/why it's happening. We're turning off as many contrib modules as we can in the meantime. Any help/advice would be MUCH appreciated!!

Answer: 
Try this code:

```
/**
 * Implements hook_preprocess_taxonomy_term().
 */
function YOURTHEME_preprocess_taxonomy_term(&$variables) {
  if ($variables->vid == YOUR_VOCABULARY_ID) {
    $variables['theme_hook_suggestions'][] = 'taxonomy_term__authors';
  }
}

```
You can use the [Taxonomy Views Integrator](http://drupal.org/project/tvi), or its working [patched version](http://drupal.org/node/1817570).

Navigate to yoursite.com/admin/structure/taxonomy/yourtaxonomyvocabulary/edit
and choose your view and view display for every vocabulary you have.