Skip to content

Commit fe4dab5

Browse files
committed
Merge branch 'feature/improve-performance' into develop
2 parents 56fba95 + 8481d70 commit fe4dab5

19 files changed

+807
-331
lines changed

FSharp.GitReader/Primitive/RepositoryFactoryExtension.fs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
namespace GitReader.Primitive
1111

1212
open System.Runtime.CompilerServices
13+
open System.Threading
1314
open GitReader
1415
open GitReader.IO
15-
open System.Threading
16+
open GitReader.Internal
1617

1718
/// <summary>
1819
/// Provides F#-specific extension methods for creating primitive repository instances.
@@ -30,7 +31,8 @@ module public RepositoryFactoryExtension =
3031
[<MethodImpl(MethodImplOptions.NoInlining)>]
3132
member _.openPrimitive(path: string, ?ct: CancellationToken) =
3233
PrimitiveRepositoryFacade.OpenPrimitiveAsync(
33-
path, new StandardFileSystem(65536), unwrapCT ct).asAsync()
34+
path, new StandardFileSystem(65536), LooseConcurrentScope.Default, unwrapCT ct).asAsync()
35+
3436
/// <summary>
3537
/// Opens a primitive repository at the specified path using a custom file system.
3638
/// </summary>
@@ -41,4 +43,17 @@ module public RepositoryFactoryExtension =
4143
[<MethodImpl(MethodImplOptions.NoInlining)>]
4244
member _.openPrimitive(path: string, fileSystem: IFileSystem, ?ct: CancellationToken) =
4345
PrimitiveRepositoryFacade.OpenPrimitiveAsync(
44-
path, fileSystem, unwrapCT ct).asAsync()
46+
path, fileSystem, LooseConcurrentScope.Default, unwrapCT ct).asAsync()
47+
48+
/// <summary>
49+
/// Opens a primitive repository at the specified path using a custom file system.
50+
/// </summary>
51+
/// <param name="path">The path to the repository.</param>
52+
/// <param name="fileSystem">The file system implementation to use.</param>
53+
/// <param name="concurrentScope">Concurrent scope.</param>
54+
/// <param name="ct">Optional cancellation token.</param>
55+
/// <returns>An async computation that returns a PrimitiveRepository instance.</returns>
56+
[<MethodImpl(MethodImplOptions.NoInlining)>]
57+
member _.openPrimitive(path: string, fileSystem: IFileSystem, concurrentScope: IConcurrentScope, ?ct: CancellationToken) =
58+
PrimitiveRepositoryFacade.OpenPrimitiveAsync(
59+
path, fileSystem, concurrentScope, unwrapCT ct).asAsync()

FSharp.GitReader/Structures/RepositoryFactoryExtension.fs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
namespace GitReader.Structures
1111

1212
open System.Runtime.CompilerServices
13+
open System.Threading
1314
open GitReader
1415
open GitReader.IO
15-
open System.Threading
16+
open GitReader.Internal
1617

1718
/// <summary>
1819
/// Provides F#-specific extension methods for creating structured repository instances.
@@ -30,7 +31,7 @@ module public RepositoryFactoryExtension =
3031
[<MethodImpl(MethodImplOptions.NoInlining)>]
3132
member _.openStructured(path: string, ?ct: CancellationToken) =
3233
StructuredRepositoryFacade.OpenStructuredAsync(
33-
path, new StandardFileSystem(65536), unwrapCT ct).asAsync()
34+
path, new StandardFileSystem(65536), LooseConcurrentScope.Default, unwrapCT ct).asAsync()
3435

3536
/// <summary>
3637
/// Opens a structured repository at the specified path using a custom file system.
@@ -42,4 +43,17 @@ module public RepositoryFactoryExtension =
4243
[<MethodImpl(MethodImplOptions.NoInlining)>]
4344
member _.openStructured(path: string, fileSystem: IFileSystem, ?ct: CancellationToken) =
4445
StructuredRepositoryFacade.OpenStructuredAsync(
45-
path, fileSystem, unwrapCT ct).asAsync()
46+
path, fileSystem, LooseConcurrentScope.Default, unwrapCT ct).asAsync()
47+
48+
/// <summary>
49+
/// Opens a structured repository at the specified path using a custom file system.
50+
/// </summary>
51+
/// <param name="path">The path to the repository.</param>
52+
/// <param name="fileSystem">The file system implementation to use.</param>
53+
/// <param name="concurrentScope">Concurrent scope.</param>
54+
/// <param name="ct">Optional cancellation token.</param>
55+
/// <returns>An async computation that returns a StructuredRepository instance.</returns>
56+
[<MethodImpl(MethodImplOptions.NoInlining)>]
57+
member _.openStructured(path: string, fileSystem: IFileSystem, concurrentScope: IConcurrentScope, ?ct: CancellationToken) =
58+
StructuredRepositoryFacade.OpenStructuredAsync(
59+
path, fileSystem, concurrentScope, unwrapCT ct).asAsync()

GitReader.Core/GitReader.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.6'">
2626
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
2727
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0" />
28+
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.1" />
2829
</ItemGroup>
2930

3031
<ItemGroup Condition="('$(TargetFramework)' == 'net45') OR ('$(TargetFramework)' == 'net461') OR ('$(TargetFramework)' == 'net462') OR ('$(TargetFramework)' == 'net48') OR ('$(TargetFramework)' == 'net481') OR ('$(TargetFrameworkIdentifier)' == '.NETStandard')">

0 commit comments

Comments
 (0)