limit the parallel operations to 8 as this seems reasonable stable with sqlite

This commit is contained in:
Philipp Häfelfinger 2023-09-11 16:42:21 +02:00
parent 58942fd603
commit 809f892b07
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ internal class FileIndexer : IFileIndexer
{
var parallelOptions = new ParallelOptions
{
MaxDegreeOfParallelism = Environment.ProcessorCount,
MaxDegreeOfParallelism = Math.Min(Environment.ProcessorCount, 8),
CancellationToken = ct
};
await Parallel.ForEachAsync(fileQueue.Reader.ReadAllAsync(ct), parallelOptions,