diff --git a/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs b/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs index 1d87af1e0..2ba110d71 100644 --- a/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs +++ b/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs @@ -105,7 +105,7 @@ namespace Migrations.Migrations.MongoDb }, new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = Environment.ProcessorCount * 2, - MaxMessagesPerTask = 1, + MaxMessagesPerTask = 10, BoundedCapacity = SizeOfQueue }); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs index 2db0782ae..44f81a1bf 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs @@ -319,7 +319,7 @@ namespace Squidex.Domain.Apps.Entities.Backup private async Task ReadEventsAsync(IBackupReader reader, IEnumerable handlers) { - const int BatchSize = 500; + const int BatchSize = 100; var handled = 0; @@ -346,7 +346,7 @@ namespace Squidex.Domain.Apps.Entities.Backup BoundedCapacity = 2 }); - var batchBlock = new BatchBlock<(string, Envelope)>(500, new GroupingDataflowBlockOptions + var batchBlock = new BatchBlock<(string, Envelope)>(BatchSize, new GroupingDataflowBlockOptions { BoundedCapacity = BatchSize }); diff --git a/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs b/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs index c599f4c57..b4bebf1bb 100644 --- a/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs +++ b/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs @@ -115,7 +115,7 @@ namespace Squidex.Infrastructure.Commands new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = parallelism, - MaxMessagesPerTask = 1, + MaxMessagesPerTask = 10, BoundedCapacity = parallelism }); diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs index 81e5f1f7e..25be745ee 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs @@ -71,7 +71,7 @@ namespace Squidex.Infrastructure.EventSourcing.Grains }, new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 1, - MaxMessagesPerTask = 1, + MaxMessagesPerTask = 10, BoundedCapacity = batchSize });