Does having more enabled modules make the site slower?
I have installed 30 modules for my site, and I am afraid that it will become too slowly.
Having more enabled modules makes the Drupal bootstrapping slower, as more files are loaded and parsed. Apart that, having more enabled modules doesn't automatically mean to have a slower site, as not all the modules execute code for every requested page.
For example, if you have installed Views and you only enabled the front page view, Views will not be executed when the requested page is a node page. Although, the Views module implements
hook_menu_alter(), and that is executed even if you have not enabled any view, but the Views module is enabled. Any implementation of
hook_menu_alter() is invoked when the menus are rebuild, and that doesn't normally happen on every page request.
Yes. However, 30 is nothing to worry about. You're in trouble when you go over 100 ;)
Install a bytecode cache (APC or XCache) to eliminate most of the slowdown of including many files, and make sure to periodically remove unused modules (usually every project gathers modules that get unused at some point during development)
In complement to both responses of @Bojan Zivanovic & @kiamlaluno which are right you should care about module interactions. Having a lot of modules increase the risks of bad modules interactions (like drug interactions). I would say having more than 50 modules becomes dangerous, and that you should check early that you do not use several modules for the same task domains.
As an example building pages with blocks, views, panels, fields containing views, blocks containing views, blocks containing panels containing views containing ... The idea is to get something that a normal brain can understand (how do my different pages are composed). This can have big impact on performances when several complex loading behaviours are hidden and chained. Another example is adding several ACL rules from several modules for each content.
If you fear for performances, always use profiling modules and track differences after each new module addition. Sometime a small hook with some SQL inside or a custom template will save your website time generation.
three things to keep in mind during site building that can speed up your drupal site are:
- Reduce the number of modules
- Check your mySQL query log for slow queries and tweak code / add indexes as necessary.
- Caching (and hoping most of your users are not authenticated)
and regarding the module part obviously greater number of module slower the speed will be, as they required a larger RAM to process..
still 30 to 60 module wont be affecting your site so much .
the ration for time of site loading and number of module is like 100 module ll delay the site by 350ms to 650ms .
hope for u next site you wuold be keeping those points in mind..:)