13

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.

11

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.

  • 6
    Having lots of modules that do "nothing" does make the site slightly slower. It has to do to the way the hook system works; Drupal does a module_hook call for every module installed, every time a hook is ran. All of these checks can add up. On our site, module_hook gets called 13,000 times and that took 168ms; every little bit adds up. – mikeytown2 Apr 6 '11 at 23:16
15

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)

  • I see that Commerce Kickstart uses 96 contrib modules. – Pere Apr 10 '13 at 12:10
  • Installing XCache made my pages render in half time. Thanks. – cherouvim Jan 26 '16 at 15:44
1

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.

  • Is drupal made for "normal brain" ? :) – pico34 Apr 10 '13 at 13:45
1

three things to keep in mind during site building that can speed up your drupal site are:

  1. Reduce the number of modules
  2. Check your mySQL query log for slow queries and tweak code / add indexes as necessary.
  3. 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..:)

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.