Is modular approach in Drupal good for performance? -
Is modular approach in Drupal good for performance? -
suppose have create functionalities a, b , c through custom coding in drupal using hooks.
either can club 3 of them in custom1.module or can create 3 separate modules them, custom1.module, custom2.module , custom3.module.
benefits of creating 3 modules:
clean code easily searchable mutually independent easy commit in multi-developer projectscons:
every module entry gets stored in database , requires query.to extent mar performance of site?
is improve create single big custom module file sake of reducing database queries or break different smaller ones?
this issue might negligible little scale websites, allow case big scale performance oriented sites.
drupal .module files loaded every page load. there little performance related can gained or lost separating functions different .module files. if not using op code cache, can improved performance creating .inc files , referencing files in menu items in hook_menu, such files loaded when menu items accessed. infrequently called functions not take memory space.
file separation in general little performance issue compared how module designed respect caching, memory use, and/or database access , structure. allow code maintenance , dependency issues drive when or not create separate modules.
performance drupal module
Comments
Post a Comment