Improve delayed individual collection loading.

This commit is contained in:
Ottermandias 2023-04-30 12:36:48 +02:00
parent 23e553c88e
commit 1ccf3a4256
3 changed files with 10 additions and 7 deletions

View file

@ -296,8 +296,8 @@ public class CollectionCacheManager : IDisposable
.Prepend(_active.Current)
.Prepend(_active.Default)
.Prepend(_active.Interface)
.Distinct()
.Select(c => CreateCache(c) ? Task.Run(() => CalculateEffectiveFileListInternal(c)) : Task.CompletedTask)
.Where(CreateCache)
.Select(c => Task.Run(() => CalculateEffectiveFileListInternal(c)))
.ToArray();
Task.WaitAll(tasks);