I have been debugging a bit an issue on our platform and I notice that our scanDirectory takes, from time to time, way to long, more than 100seconds. I have been looking at the default.settings.php and I noticed
/**
* The default list of directories that will be ignored by Drupal's file API.
*
* By default ignore node_modules and bower_components folders to avoid issues
* with common frontend tools and recursive scanning of directories looking for
* extensions.
*
* @see file_scan_directory()
* @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory()
*/
$settings['file_scan_ignore_directories'] = [
'node_modules',
'bower_components',
'vendor',
];
I found that out that our sites/default directory is the one to blame. Can I just add it here? Or should I include the subdirectories(fx sites/default/files)?
I am really surprised about this one. Been working with drupal years now and I see this first time!