Enable parallel query for custom sources

This commit is contained in:
Vic 2022-11-03 17:40:16 +08:00
parent 36f67b8f32
commit b0a4ac7996

View file

@ -381,6 +381,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
private static IEnumerable<Win32> UnregisteredPrograms(List<ProgramSource> sources, string[] suffixes, string[] protocols)
{
var paths = ExceptDisabledSource(sources.Where(s => Directory.Exists(s.Location) && s.Enabled)
.AsParallel()
.SelectMany(s => ProgramPaths(s.Location, suffixes)))
.Distinct();