Reduce load time of trace page by deferring critical path tooltip#2718
Reduce load time of trace page by deferring critical path tooltip#2718yurishkuro merged 2 commits intojaegertracing:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2718 +/- ##
=======================================
Coverage 96.78% 96.79%
=======================================
Files 256 256
Lines 7937 7944 +7
Branches 2045 1994 -51
=======================================
+ Hits 7682 7689 +7
- Misses 254 255 +1
+ Partials 1 0 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
yurishkuro
left a comment
There was a problem hiding this comment.
I understand what you're trying to do (effectively reduce the size of the DOM), but the resulting behavior is unintuitive, from a user perspective the tooltip would work or not "randomly" (unless they know about 500 spans threshold).
Isn't there another mechanism in React where the tooltip doesn't need to be physically added to the DOM but still can be shown dynamically?
|
I agree this is not perfect.
Thanks for the question, it made me think a bit more. Tbh I am not very familiar with react, so I am open to all suggestions. I made changes to create the tooltip only on hover 41ef333, I just added another commit, and removed previous changes in the same commit, just remember to squash the commits when merging (or I can squash this locally and force push), I am not sure if you squash all commits by default, on merge Render time in profiler looks goodTooltips work correctly |
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBar.tsx
Outdated
Show resolved
Hide resolved
Improve performance (~300ms for 500 spans) by loading critical path tooltip only on hover. Signed-off-by: Damian Maslanka <damian.maslanka5@gmail.com>
41ef333 to
8f55be9
Compare
|
@yurishkuro, I updated this branch
|
| </div> | ||
| } | ||
| > | ||
| <div |
There was a problem hiding this comment.
can we avoid duplicating this code segment?
There was a problem hiding this comment.
Yes, see #2718 (comment)
I will change this tomorrow
There was a problem hiding this comment.
in ef0fc70 I moved the duplicated code to const criticalPath
Signed-off-by: Damian Maslanka <damian.maslanka5@gmail.com>


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
Before
After