Repository navigation
fix: Re-enable memory-aware pooling - #25823
Merged
ramezgerges merged 2 commits intoOct 30, 2026
Merged
Conversation
The ArrayPool and FrameworkTemplatePool providers probed "Windows.System.MemoryManager, Uno", which no longer resolves since the assembly became Uno.WinRT, so both always ran without memory management. They now check MemoryManager.IsAvailable directly. The template pool also required AppMemoryUsage > 0 at type init; on Skia that reads 0 until the first GC, so it stayed off. The pool now skips the memory check only while the limit has no reading. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
The build 242267 found UI Test snapshots differences: Details
|
ajpinedam
approved these changes
Oct 30, 2026
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Xiaoy312
approved these changes
Oct 30, 2026
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #24871
PR Type:
🐞 Bugfix
What changed? 🚀
Memory-aware pooling had been silently off since the
Unoassembly was renamed toUno.WinRT.1. Stale assembly name (
ae35aaf5bb)DefaultArrayPoolPlatformProviderandFrameworkTemplatePoolDefaultPlatformProvidercheckedApiInformation.IsPropertyPresent("Windows.System.MemoryManager, Uno", ...). That name never resolves now, so both pools ran without memory management.MemoryManager.IsAvailabledirectly (true on Skia, WebAssembly and Android; false on iOS, as before).2. Template pool disabled before the first GC (same commit, not mentioned in the issue)
MemoryManager.AppMemoryUsage > 0once, at type initialization. On Skia that value comes fromGC.GetGCMemoryInfo(), which reads 0 until the first garbage collection, so the pool stayed off even with the name fixed.FrameworkTemplatePool.CanUsePoolnow skips the memory check only while the memory limit has no reading yet.3. Stale probes in tests and samples (
727a27ce37)", Uno"→", Uno.WinRT"inGiven_MemoryManager,PersonPictureTests,DispatcherQueueExtensions, and theVibrationDevice,IsScreenCaptureEnabledandMessageDialogsample checks. Each type was checked to live inUno.WinRT.Given_MemoryManager.When_AppMemoryUsage/When_AppMemoryUsageLimithad been reporting Inconclusive because of the old name; they now run.Behaviour change: pooling now reacts to memory pressure again. On Skia the reading is the machine's overall memory load, so under heavy system memory pressure the template pool stops pooling, as designed.
Validation (Skia Desktop, Win32)
Given_MemoryManager.When_Probed_By_Assembly_NameandWhen_Pools_Check_MemoryManager: the latter fails without the fix (template pool assertion) and passes with it.Given_MemoryManagerandPersonPictureTests: all pass.Given_FrameworkTemplatePool,Given_ComboBox,Given_ListViewBase,Given_FrameworkTemplate_And_Leak,Given_MemoryManager: 217 passed, 15 skipped, 1 inconclusive, 0 failed.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code