瀏覽代碼

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 月之前
父節點
當前提交
8249c30167

+ 0 - 6
frameworks/CSharp/touchsocket/src/TouchSocketHttp/Program.cs

@@ -15,12 +15,6 @@ public class Program
 
         await service.SetupAsync(new TouchSocketConfig()
              .SetListenIPHosts(port)
-             .SetNoDelay(true)
-             .SetTransportOption(options =>
-             {
-                 options.ReceivePipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
-                 options.SendPipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
-             })
              .SetMaxCount(1000000)
              .ConfigureContainer(a =>
              {

+ 1 - 0
frameworks/CSharp/touchsocket/src/TouchSocketHttp/TouchSocketHttp.csproj

@@ -5,6 +5,7 @@
 		<Nullable>enable</Nullable>
 		<OutputType>Exe</OutputType>
 		<ImplicitUsings>enable</ImplicitUsings>
+		<ServerGarbageCollection>true</ServerGarbageCollection>
 		<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-452b-beb6-47d798a5a131</UserSecretsId>
 	</PropertyGroup>
 

+ 1 - 1
frameworks/CSharp/touchsocket/src/TouchSocketHttp31/TouchSocketHttp31.csproj

@@ -7,8 +7,8 @@
 		<ImplicitUsings>enable</ImplicitUsings>
 		<InvariantGlobalization>true</InvariantGlobalization>
 		<!--<PublishAot>true</PublishAot>-->
-		<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-455b-beb6-47d798a5a131</UserSecretsId>
 		<ServerGarbageCollection>true</ServerGarbageCollection>
+		<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-455b-beb6-47d798a5a131</UserSecretsId>
 	</PropertyGroup>
 
 	<ItemGroup>

+ 0 - 6
frameworks/CSharp/touchsocket/src/TouchSocketWebApi/Program.cs

@@ -18,12 +18,6 @@ public class Program
         builder.Services.AddServiceHostedService<IHttpService, HttpService>(config =>
         {
             config.SetListenIPHosts(8080)
-            .SetNoDelay(true)
-             .SetTransportOption(options =>
-             {
-                 options.ReceivePipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
-                 options.SendPipeOptions = TransportOption.CreateSchedulerOptimizedPipeOptions();
-             })
             .SetMaxCount(1000000)
            .ConfigureContainer(a =>
            {

+ 1 - 0
frameworks/CSharp/touchsocket/src/TouchSocketWebApi/TouchSocketWebApi.csproj

@@ -4,6 +4,7 @@
 		<TargetFramework>net9.0</TargetFramework>
 		<Nullable>enable</Nullable>
 		<ImplicitUsings>enable</ImplicitUsings>
+		<ServerGarbageCollection>true</ServerGarbageCollection>
 		<UserSecretsId>dotnet-WorkerService1-19b37b17-6043-4334-ad9a-9e0e3c670da3</UserSecretsId>
 	</PropertyGroup>
 

+ 1 - 1
frameworks/CSharp/touchsocket/src/TouchSocketWebApi31/TouchSocketWebApi31.csproj

@@ -6,8 +6,8 @@
 		<ImplicitUsings>enable</ImplicitUsings>
 		<InvariantGlobalization>true</InvariantGlobalization>
 		<!--<PublishAot>true</PublishAot>-->
-		<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-452b-beb7-47d798a5a131</UserSecretsId>
 		<ServerGarbageCollection>true</ServerGarbageCollection>
+		<UserSecretsId>dotnet-TouchSocketWebApi-987c185f-10b1-452b-beb7-47d798a5a131</UserSecretsId>
 	</PropertyGroup>
 
 	<ItemGroup>