drupal 7: my hook module make my site slow? I create my own hooks module, in a simple frame (to test it) to change  in exposed filter of view to 'All' , but when I enable this module, it's work fine but make my site slow .. and just when I disable it , my site back to fast, what is my mistake?

myhooks.info

name = my hooks module
description = hooks website module.
package = myhooks
core = 7.x


myhooks.module

function myhooks_form_views_exposed_form_alter(&amp;$form, $form_state, $form_id) {
  if($form_id == 'views_exposed_form') { 
    $form['name_list']['#options']['All'] = 'All';
  }
}
I see two possible reasons:


You pass form state by value. It should be passed by reference. It is a really, really big array, so copying it when there is no need to may eat up quite a lot of memory, slowing down everything.
You alter $form['name_list']['#options'] in all views exposed forms. But probably most of these forms does not have name_list element at all. So what you do can generate array items that are bad from form api point of view, slowing down form processing, and generate warnings. Server will not show you warnings, but it will save them to error logs, and writing to disk is slow.