Browse Source

Reduce parallelization.

pull/681/head
Sebastian Stehle 5 years ago
parent
commit
4ab6d1388c
  1. 1
      backend/src/Migrations/Migrations/ClearSchemas.cs
  2. 1
      backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs
  3. 4
      backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs
  4. 1
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/DefaultValues/DefaultValuesTests.cs

1
backend/src/Migrations/Migrations/ClearSchemas.cs

@ -5,7 +5,6 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Squidex.Domain.Apps.Entities.Schemas.DomainObject; using Squidex.Domain.Apps.Entities.Schemas.DomainObject;
using Squidex.Infrastructure.Migrations; using Squidex.Infrastructure.Migrations;

1
backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs

@ -8,7 +8,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow; using System.Threading.Tasks.Dataflow;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;

4
backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs

@ -85,7 +85,7 @@ namespace Squidex.Infrastructure.Commands
private async Task InsertManyAsync<T, TState>(IStore<TState> store, IdSource source, CancellationToken ct = default) where T : DomainObject<TState> where TState : class, IDomainState<TState>, new() private async Task InsertManyAsync<T, TState>(IStore<TState> store, IdSource source, CancellationToken ct = default) where T : DomainObject<TState> where TState : class, IDomainState<TState>, new()
{ {
var parallelism = Environment.ProcessorCount * 2; var parallelism = Environment.ProcessorCount;
const int BatchSize = 100; const int BatchSize = 100;
@ -116,7 +116,7 @@ namespace Squidex.Infrastructure.Commands
{ {
MaxDegreeOfParallelism = parallelism, MaxDegreeOfParallelism = parallelism,
MaxMessagesPerTask = 1, MaxMessagesPerTask = 1,
BoundedCapacity = parallelism * 2 BoundedCapacity = parallelism
}); });
var batchBlock = new BatchBlock<DomainId>(BatchSize, new GroupingDataflowBlockOptions var batchBlock = new BatchBlock<DomainId>(BatchSize, new GroupingDataflowBlockOptions

1
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/DefaultValues/DefaultValuesTests.cs

@ -5,7 +5,6 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
using System.Collections.Generic;
using NodaTime; using NodaTime;
using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.Apps;
using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Contents;

Loading…
Cancel
Save