Skip to content

Improve performance when expanding/collapsing span details #2716

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

Merged

Conversation

DamianMaslanka5
Copy link
Contributor

@DamianMaslanka5 DamianMaslanka5 commented Apr 6, 2025

Improve performance when expanding/collapsing span details (tags/process)

Related to #645

Memoize "calculation" of criticalPathSections per span, when span is not collapsed

Prepare data

Run go run cmd/tracegen/main.go -service abcd -traces 1 -spans 300 from the jaeger repo

Perf difference

Total render time from the profiler available in react devtools, after collapsing Tags section

With these changes

14ms

image

Changes from master

548ms

image

firefox_Ddmz0w1Z7u.mp4

…ess)

Memoize "calculation" of criticalPathSections per span, when span is not collapsed

## Prepare data

Run `go run cmd/tracegen/main.go -service abcd -traces 1 -spans 300` from the jaeger repo

## Perf difference

Total render time from the profiler available in react devtools,
after collapsing Tags section

### With these changes

14ms

### Changes from master

548ms

Signed-off-by: Damian Maslanka <[email protected]>
@DamianMaslanka5 DamianMaslanka5 requested a review from a team as a code owner April 6, 2025 10:45
@DamianMaslanka5 DamianMaslanka5 requested review from pavolloffay and removed request for a team April 6, 2025 10:45
Copy link

codecov bot commented Apr 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.69%. Comparing base (d5a9de9) to head (2d53046).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2716   +/-   ##
=======================================
  Coverage   96.68%   96.69%           
=======================================
  Files         256      256           
  Lines        7884     7889    +5     
  Branches     2061     2060    -1     
=======================================
+ Hits         7623     7628    +5     
+ Misses        261      260    -1     
- Partials        0        1    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Apr 6, 2025
@DamianMaslanka5
Copy link
Contributor Author

  1. I ran npm run prettier to fix CI 1a65b43
  2. I replaced import { groupBy } from 'lodash'; with import _groupBy from 'lodash/groupBy'; to match style of other imports 2d53046

Is there anything else that I can do to make reviewing these changes easier?

@yurishkuro yurishkuro enabled auto-merge April 10, 2025 03:10
@yurishkuro yurishkuro added this pull request to the merge queue Apr 10, 2025
Merged via the queue into jaegertracing:main with commit db095fb Apr 10, 2025
9 checks passed
@DamianMaslanka5
Copy link
Contributor Author

Thanks @yurishkuro!

@yurishkuro
Copy link
Member

Thanks for contributing

github-merge-queue bot pushed a commit that referenced this pull request Apr 28, 2025
)

~I am opening this PR without an issue, I understand that is might not
be an acceptable change, feel free to close this PR if you don't agree
with this change.~

Improve performance (~300ms for 500 spans) by loading tooltip only on
hover

* Related issue in antd repo
ant-design/ant-design#48468
* My other changes which improve performance related to critical path
#2716
* Towards #645, to
improve general performance with large amount of spans

## Before


![criticalPathTooltip](https://github.com/user-attachments/assets/908b6279-a3b8-4446-a08b-386220e22141)


## After


![criticalPathNoTooltip](https://github.com/user-attachments/assets/e7eb14e2-6acd-4f6d-94cb-ce1d82515e02)

---------

Signed-off-by: Damian Maslanka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants