Skip to content
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

Improve get trace name performance #574

Merged

Conversation

everett980
Copy link
Collaborator

@everett980 everett980 commented May 12, 2020

Which problem is this PR solving?

Short description of the changes

  • Replace reduce of spans into allTraceSpans with a set of allIDs
  • Replace multiple loops with a single for loop
  • Memoization remains beneficial as it improves the render time of the gantt chart and other trace views by 3x (from 750ms to 250ms for test trace).

everett980 and others added 5 commits May 12, 2020 13:12
Signed-off-by: Everett Ross <reverett@uber.com>
Signed-off-by: Everett Ross <reverett@uber.com>
Signed-off-by: Everett Ross <reverett@uber.com>
Signed-off-by: Everett Ross <reverett@uber.com>
@everett980 everett980 requested a review from tiffon as a code owner May 12, 2020 19:46
@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #574 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #574      +/-   ##
==========================================
+ Coverage   89.92%   89.97%   +0.04%     
==========================================
  Files         214      214              
  Lines        5221     5225       +4     
  Branches     1334     1338       +4     
==========================================
+ Hits         4695     4701       +6     
+ Misses        483      481       -2     
  Partials       43       43              
Impacted Files Coverage Δ
packages/jaeger-ui/src/model/trace-viewer.tsx 100.00% <100.00%> (ø)
...eViewer/TimelineHeaderRow/TimelineViewingLayer.tsx 91.52% <0.00%> (+3.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e348fd...7825437. Read the comment docs.

@yurishkuro yurishkuro merged commit 1d68cf4 into jaegertracing:master May 12, 2020
@yurishkuro
Copy link
Member

👏 👏 👏

vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 5, 2021
* Memoize getTraceName to improve render time by 3x

Signed-off-by: Everett Ross <reverett@uber.com>

* Clean up memoization approach

Signed-off-by: Everett Ross <reverett@uber.com>

* Fix merge

Signed-off-by: Everett Ross <reverett@uber.com>

* Fix getTraceNameImpl to be O n

Signed-off-by: Everett Ross <reverett@uber.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support loading traces with large number of spans.
2 participants