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?
Yes. It can.
Despite what the others say, there are several situations in which performance will go down.
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.
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.