ExtensionDiscovery::scanDirectory() takes too long
If you need the file_scan_ignore_directories setting changed, you should add the $settings['file_scan_ignore_directories'] assignment in your settings.php, not default.settings.php lest it's overwritten when you update Drupal core.
Regarding what path strings to add to $settings['file_scan_ignore_directories'], that's up to you. As the comment block states, that setting affects all calls to ExtensionDiscovery::scanDirectory() and FileSystem::scanDirectory() (if a nomask option isn't specified).
Add the most inclusive path that you know will never contain extensions or files to be scanned/discovered.