Skip to content

Commit 0ef10ff

Browse files
authored
Merge pull request #24209 from unoplatform/dev/devserver-gc-profile
fix(devserver): memory-conscious GC profile for the Hot Reload host
2 parents 042158c + 26bcadf commit 0ef10ff

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/Uno.UI.RemoteControl.Host/Uno.UI.RemoteControl.Host.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
<Nullable>enable</Nullable>
99
<NoWarn>$(NoWarn);VSTHRD200</NoWarn>
1010
<DefineConstants>$(DefineConstants);IS_DEVSERVER</DefineConstants>
11+
12+
<!-- The dev-server is a long-running background daemon on the developer's machine.
13+
The default Web SDK profile (Server GC) is throughput-oriented and retains committed
14+
memory; switch to a memory-conscious Workstation profile instead. See #24203. -->
15+
<ServerGarbageCollection>false</ServerGarbageCollection>
16+
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
1117
</PropertyGroup>
1218

1319
<Import Project="../targetframework-override-noplatform.props" />
@@ -99,4 +105,12 @@
99105
<Target Name="GetTargetPath" />
100106
<Target Name="GetCopyToPublishDirectoryItems" />
101107

108+
109+
<ItemGroup>
110+
<!-- runtimeconfig.template.json is a build-time input merged into the generated
111+
Uno.UI.RemoteControl.Host.runtimeconfig.json; it must not be copied to output
112+
nor packed. See #24203. -->
113+
<Content Remove="runtimeconfig.template.json" />
114+
</ItemGroup>
115+
102116
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"configProperties": {
3+
"System.GC.ConserveMemory": 5,
4+
"System.GC.HeapHardLimitPercent": 66,
5+
"System.GC.HighMemoryPercent": 70
6+
}
7+
}

0 commit comments

Comments
 (0)