Posted by lorlarz2 on March 2, 2012 at 10:35pm
I have several or many modules which are disabled. I have a Drupal Tweets admin menu that would seem to let me also uninstall the unused (disabled) modules. Is there an advantage (OR difference) with uninstalling disabled modules: Is there a difference at all or a performance difference one could get by uninstalling disabled modules?
Comments
It depends...as always
It comes down to whether or not the modules you have installed have used what is called a "Schema" for the tables they create/modify in your drupal installation.
By "disabling" the module, you simply make the code within the module unavailable, but the tables that contain the data the module used still exist in your database.
If the module used a schema to create these tables, uninstalling them will remove these tables (and all data they contain) from your drupal installation.
Some modules use the install and uninstall hooks to perform other operations.
I am interested in possible effects on performance
I am interested in possible effects on performance: I have for one thing about everything related to ubercart installed, but disabled. Could such a thing affect performance of the site for end users (e.g. load time for the front page or for pages)?
And, importantly:
If I decide to uninstall any or all the disabled modules, is there any chance that could mess anything up?
When you un-install a
When you un-install a disabled module those modules are given the opportunity to basically do "garbage collection" and cleanup after themselves. Things like delete any tables that they created or remove things from the {variables} table. Any good module will do this when it is un-installed. So .. the only chance of messing things up is if you've installed a module, collected a bunch of data with it, and then disabled it. When the module is disabled the data and configuration are still there, but just not being actively used until the module is turned on again. If you un-install a module all that collected data and configuration will be lost. You can always install the module again later and it will create the necessary tables they will just be empty as if it was the first time you installed.
Having modules disabled but not un-installed will have very very little affect on the performance of your site. If any.
If you're going to remove the code from your site (delete the .module) files, it's probably a good idea to un-install first just to keep things tidy.