2

I have some modules that Im not using and they are inactive, if I uninstall and delete those modules could I improve th performance of my site, my site is becoming very very slow, the ajax requests are slow everything is slow....

  • 1
    You can test a lot of modules on a dev site but my advise is to have a cleaning moment before going for staging or live, not importing the whole sites/all/modules/folders but select the ones you really use. The whole site will be healthier, less requests, less updates and so on. – Tritof Jun 10 '14 at 17:38
  • Pretty positive this is a dup. – mpdonadio Jun 11 '14 at 16:43
2

Definitely it would slow down your site performance as realized from my personal experience. Every time drupal look for .info file and unnecessary read that, if any hook alter function is there it also get executed every time. It also checking for latest updates, unnecessary increasing headache to your system. If some js or css is using in that module, also including and evaluating by drupal bootstrap every time. It increasing overhead for module_invoke_all() function. At last I would say, don't think twice and get uninstalled these modules because it unnecessary increasing overhead on db and slow down your site performance. Even this is not a good practice to keep unused module in site without uninstall.

For more info see following links.

https://drupal.org/node/250783

Do non-enabled modules affect performance?

In past I also faced this issue, I just uninstalled all disabled modules and ran update.php for all my contributed modules that help me to increase site performance.

  • According to what I'd think (and your 2nd link) it should not fire any hooks nor add any css or js to Drupal. (what else would be the idea of disabling them?) Standard Drupal settings do not check for updates of disabled modules, so possibly no loss there. Leaving only the .info files and database leftovers that indeed will cause unnecessary overhead. Please correct me if I'm wrong. – Neograph734 Jun 10 '14 at 23:36
  • Thanks, Yes you are also correct but I was also saying the same thing. My mean form this sentence is "If some js or css is using in that module, also including and evaluating by drupal bootstrap every time." => If any js or css including through .info file of this module. – Pushpinder Rana Jun 23 '14 at 4:34
3

I don't understand Jance's response. He says "it won't hurt", but then says these disabled modules are sucking up resources?

Saying inactive modules don't impact performance is not completely accurate... but it certainly is less important than the number of enabled modules.

While the hooks of an inactive module with code left in sites/all/modules aren't loaded when a specific form or page is loaded, all .info files from any code active or inactive are scanned when loading the admin/modules and admin/themes. Drush also scans all directories for Drush related includes in profiles and sites... regardless of what's active. Inactive modules aren't going to cause as much of a hit to CPU and memory as an enabled module, but having unused code in sites/all/modules isn't a good thing. Best practice would be to only install modules on a test site. Never install a module on a live site just to test it. Even when uninstalled, modules can leave a lot of cruft behind that can impact performance.

Modules that were once installed, but are now inactive could create tables and define variables add to the cruft at the database layer. Even if you uninstall the module, the uninstall process relies on the developers who wrote the module to clean up after themselves. Modules that use Features often leave even more cruft behind. Disabling a Feature "module" does not remove the content types, taxonomies, fields, views, blocks, etc that it created. Even uninstalling and deleting the code doesn't always clean up after a Feature.

I realize that not everyone can afford the type of dev -> test -> live workflow you get with a Drupal specific host like Acquia or Pantheon or has the technical skill to run a local version of their site, but if you don't have that type of testing environment be prudent about the modules you enable then uninstall.

Alas, hindsite is 20/20... for modules you've already enabled in the past that you've decided not to use, uninstall them and remove the code from sites/all any module. This won't improve performance as much as reducing the number of modules enabled, but leaving this code certainly won't help performance or your ability to maintain the site.

  • 1
    The OP said the modules were inactive, but then asked if he were to uninstall those modules if he would see a speed increase. This tells me the modules are still installed and running on his site. They are NOT disabled, and so they still firing off their hook functions. – Jance Jun 10 '14 at 16:47
0

It won't hurt. Depending on how many modules you have, each time a given hook is fired off, all those modules maybe jumping in with unused functions.

Also, as your not using those modules, your probably not keeping them up to date, which would cause a security risk. It's also probably sucking your php memory. All good reasons to uninstall them if you aren't using them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.