Repository navigation
Conversation
Contributor
Contributor
|
This seems like a good idea, instead of rebuilding the peer list from whole cloth on each update, though:
|
Contributor
|
Food for thought: there are two different issues we should look into (and decide what we want to solve):
|
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.
Summary
Keep frequency group and peer row view models stable across full peer-status snapshots. The client now reconciles rows by frequency and peer ID, updating fields in place and inserting, moving, or removing only changed items. This avoids rebuilding the Avalonia peer panel for every server snapshot.
Incident context
This memory issue was observed during UOAF Event 750. I was flying as Bulldog21 when the client froze, followed by CFIT. I rejoined as Bulldog24. During the final attack on SA-17 East, I experienced a disconnect/desync and was shot down by a Su-27. Shared investigation and discussion.
Dump analysis
A full dump from OpenFreq Client 1.1.5 after roughly two hours of use showed:
ChannelPeerViewModelChannelFrequencyPeerViewModelAvalonia.Controls.Shapes.EllipseThe peer row XAML creates two ellipses per row.
2 × 88,590 = 177,180, accounting for nearly every ellipse in the dump. The oldRebuildPeerListsimplementation created new view models, cleared both bound collections, and added every group on each full snapshot. Avalonia consequently recreated the corresponding controls and bindings. Most of that memory was collectible at capture, but it remained in the committed Gen2 heap. A separate 2 GiB read-only heightmap mapping was also present in the dump; it is not the 4.6 GB managed heap.The dump was captured shortly after BMS exited, so the 79 MB reachable figure describes that moment. It does not establish peak liveness during gameplay. The dump itself is not uploaded because it contains user/session data.
Changes
Verification
dotnet test OpenFreq.sln -c Release --nologo: 442 passed (129 client, 153 common, 160 server).dotnet build OpenFreq.Client.Tests/OpenFreq.Client.Tests.csproj -c Release --no-restore -warnaserror: 0 warnings, 0 errors.dotnet format --verify-no-changesfor changed files: passed.