Maybe it's a core or environment issue but i noticed very critical performance impact when missing some modules like panopoly_admin through drupal_get_path().
When the checked module is missing Drupal walks through all modules and the IO READ (inspected through 'iotop' command) rises from 95-99.9% for about 10 seconds, so the first request to browser takes about 10 seconds instead of no more than few hundred miliseconds.
It looks like that it's a good practise to test if the module exist first before calling drupal_get_path()? But it's strange that this is a common practise to just use drupal_get_path('module', 'mymodule') alone. But performance impact of this is minimally 1500% (walking through about 80 modules) in my case.
Comment | File | Size | Author |
---|---|---|---|
fix-huge-performance-searching-directories-for-missing-modules.patch | 3.06 KB | boreg |
Comments
Comment #2
shadcn CreditAttribution: shadcn commentedThanks. I've pushed a fix for this.
Some helpful links if someone wants to read more about this:
http://stackoverflow.com/questions/27872098/drupal-performance-file-scan...
http://foxinbox.org/content/avoiding-drupalgetpathdrupalgetfilename-db-hits