-
Notifications
You must be signed in to change notification settings - Fork 707
Optimize trace detail page performance #10308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes the trace detail page performance by preventing unnecessary updates when other traces are modified. The optimization adds a check to compare the span count of the currently viewed trace before updating the UI, only refreshing when the trace has actually changed.
Key changes:
- Added span count comparison to avoid unnecessary UI updates when other traces change
- Refactored trace retrieval into a separate method for reusability
- Added comprehensive tests to verify both update and non-update scenarios
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Aspire.Dashboard/Components/Pages/TraceDetail.razor.cs |
Added optimization logic to check trace changes before UI updates and extracted GetTrace method |
tests/Aspire.Dashboard.Components.Tests/Pages/TraceDetailsTests.cs |
Added test coverage for trace update scenarios and logging verification |
|
Is this for 9.4? |
|
No |
7e29424 to
8c56808
Compare
8c56808 to
b5bffc0
Compare
Description
Trace detail page is updated when new trace data is received. This is so the currently viewed trace is updated with new spans.
However a lot of the time it is unnessary. Other traces are being updated, but the trace detail page is still updated with unchanged data. This PR adds a check to see whether the currently viewed trace has changed or not and skips updating the page if it hasn't.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate