Skip to content

Commit 8249c30

Browse files
authored
optimize(touchsocket):scheduler (#10222)
* update(touchsocket):version to 4.0.0-rc.2 * update(touchsocket):version to 4.0.0-rc.5 * optimize(touchsocket):scheduler * Performance (TouchSocketHttp, TouchSocketWebApi): Enable server garbage collection
1 parent 065ada5 commit 8249c30

File tree

6 files changed

+4
-14
lines changed

6 files changed

+4
-14
lines changed

frameworks/CSharp/touchsocket/src/TouchSocketHttp/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ private static async Task Main(string[] args)
1515

1616
await service.SetupAsync(new TouchSocketConfig()
1717
.SetListenIPHosts(port)
18-
.SetNoDelay(true)
19-
.SetTransportOption(options =>
20-
{
21-
options.ReceivePipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
22-
options.SendPipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
23-
})
2418
.SetMaxCount(1000000)
2519
.ConfigureContainer(a =>
2620
{

frameworks/CSharp/touchsocket/src/TouchSocketHttp/TouchSocketHttp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<Nullable>enable</Nullable>
66
<OutputType>Exe</OutputType>
77
<ImplicitUsings>enable</ImplicitUsings>
8+
<ServerGarbageCollection>true</ServerGarbageCollection>
89
<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-452b-beb6-47d798a5a131</UserSecretsId>
910
</PropertyGroup>
1011

frameworks/CSharp/touchsocket/src/TouchSocketHttp31/TouchSocketHttp31.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<ImplicitUsings>enable</ImplicitUsings>
88
<InvariantGlobalization>true</InvariantGlobalization>
99
<!--<PublishAot>true</PublishAot>-->
10-
<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-455b-beb6-47d798a5a131</UserSecretsId>
1110
<ServerGarbageCollection>true</ServerGarbageCollection>
11+
<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-455b-beb6-47d798a5a131</UserSecretsId>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

frameworks/CSharp/touchsocket/src/TouchSocketWebApi/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ public static void Main(string[] args)
1818
builder.Services.AddServiceHostedService<IHttpService, HttpService>(config =>
1919
{
2020
config.SetListenIPHosts(8080)
21-
.SetNoDelay(true)
22-
.SetTransportOption(options =>
23-
{
24-
options.ReceivePipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
25-
options.SendPipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
26-
})
2721
.SetMaxCount(1000000)
2822
.ConfigureContainer(a =>
2923
{

frameworks/CSharp/touchsocket/src/TouchSocketWebApi/TouchSocketWebApi.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
<ServerGarbageCollection>true</ServerGarbageCollection>
78
<UserSecretsId>dotnet-WorkerService1-19b37b17-6043-4334-ad9a-9e0e3c670da3</UserSecretsId>
89
</PropertyGroup>
910

frameworks/CSharp/touchsocket/src/TouchSocketWebApi31/TouchSocketWebApi31.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<InvariantGlobalization>true</InvariantGlobalization>
88
<!--<PublishAot>true</PublishAot>-->
9-
<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-452b-beb7-47d798a5a131</UserSecretsId>
109
<ServerGarbageCollection>true</ServerGarbageCollection>
10+
<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-452b-beb7-47d798a5a131</UserSecretsId>
1111
</PropertyGroup>
1212

1313
<ItemGroup>

0 commit comments

Comments
 (0)