Simplified Caching and forced dirty if geometry is null - #33
Merged
Merged
Conversation
carl-andersson-at-westermo
requested review from
kngrektor
and
a lite review from Copilot
September 11, 2026 11:26
Copilot started reviewing on behalf of
carl-andersson-at-westermo
September 11, 2026 11:27
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
One or more issues must be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Simplifies edge geometry caching by hashing computed points and updates related tests.
Changes:
- Replaces the detailed geometry-input signature with a point hash.
- Refactors routed point updates and self-loop geometry preparation.
- Adjusts caching and batched-rendering tests.
File summaries
| File | Description |
|---|---|
| Westermo.GraphX.Controls.Avalonia/Controls/EdgeControlBase.cs | Updated as part of this pull request. |
| Westermo.GraphX.Controls.Avalonia.Tests/GeometryCachingTests.cs | Updated as part of this pull request. |
| Westermo.GraphX.Controls.Avalonia.Tests/BatchedEdgeRenderingTests.cs | Updated as part of this pull request. |
Review details
Suppressed comments (1)
Westermo.GraphX.Controls.Avalonia/Controls/EdgeControlBase.cs:807
- For a self-loop using
PART_SelfLoopedEdge,PrepareSelfLoopedEdgedeliberately returns null, soLineGeometryremains null by design. This condition consequently marks the edge dirty on every invalidated measure, rerunsPrepareEdgeLayout, and notifies the batched renderer even though the custom indicator is the rendered visual. Distinguish an expected null custom-template path from a failed geometry build, or retain a separate successful-layout state, to avoid this repeated work.
_isGeometryDirty = LineGeometry is null || changed;
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kngrektor
approved these changes
Sep 11, 2026
kngrektor
left a comment
There was a problem hiding this comment.
I'd probably rename signature to hash
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.
No description provided.