Question

Does having Drupal modules present, but not enabled have any effect on the performance of a Drupal site?

To put it another way.. Would removing disabled modules from a Drupal site have a positive affect on performance?

Was it helpful?

Solution

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.

OTHER TIPS

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).

From my experience, the performance decrease from disabled modules is negligible (and relative, 4000 disabled modules might make things a little slower than 30 disabled modules, etc.)

Personally, I'm just more concerned about unused (and probably outdated) code sitting in my repo and web dirs, but I'm anally retentive like that.

Technically no and yes. Normally disabled moduels don't load in memory, so they won't affect the performance of the site as such. But if the disabled modules has lot of data in variables, then it is advisable to uninstall them so that the memory gets freed up.

Removing the code of the disabled modules might not have an effect on the site.

Then again, if you installed a module at some point, it will have populated the database with a few tables. So the more modules you install, the greater the chance of affecting database performance.

Uninstalling the module will remove those unnecessary tables.

Again, performance depends on the number of modules you have installed.

The disabled modules that are not uninstalled but physically deleted from folder system would adversely impact the site performance. I had 5 such modules and due to that, there were additional 10,000 calls to is_dir() function. I used missing_modules module (missing_module) to identify the missing modules and fixed the issue in the database.

Uninstalled and disabled will not effect on performance.

But if the module is disabled only then it may have some tables associated so those are extra burden on the drupal database.

And as said earlier there will be some significant performance issue on drupal's module page. Many times this page is not loaded and takes a lot of time because of all the module those are installed/ uninstalled are displayed there.

So for overcoming this situation we should remove physically the unused modules from /sites/all/modules/ drive.

Disabled modules do not affect the performance of drupal site.

But it is recommended not to download the modules which would be of no use to your site.

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top