Drupal - Do non-enabled modules affect performance?

Generally no it will not affect performance - except for when you are viewing your Modules selection page (admin/build/modules or admin/modules). Disabled modules are not loaded into memory and never executed.


Yes. It can.

Despite what the others say, there are several situations in which performance will go down.

  1. Disabled, and not properly uninstalled modules can have severe effects on performance: variables for a module are not removed and will be loaded at every pagerequest. Locales for a module (in case you use a translated site) are not removed and cause overhead on an already cumbersome database-table.
  2. Drupal uses the system table as caching to avoid lookups in the filesystem for modules. The more entries there are in that table, the slower it will be. This effect is rather small, because the system table is quite well indexed. However, cache-clears and visiting the admin pages cause this table to be rebuilt. Rebuilding the table with 200+ unused modules is about 25 times slower than with no unused modules. The amount of rebuilding of this table can be quite high in some weird situations, during development and so.

Unused modules do not use more memory other then during rebuild of the system table. Unused modules do not cause more or slower lookups on your filesystem, other then during rebuilding the system table. If you go above the X-thousands of modules, then the filesystem itself can cause trouble.


With installed I suppose you mean inside your drupal modules ("sites/all/modules" or "sites/yoursite.com/modules") folder, right?

If so, disabled modules won't affect performance at all, just when you visit your "admin/build/modules" page. Drupal rebuilds the cache of some module elements (as hook_menu).

Tags:

Performance

7