Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Tooltip slows down panel refresh #12

Open
marcusolsson opened this issue Sep 17, 2020 · 1 comment
Open

Tooltip slows down panel refresh #12

marcusolsson opened this issue Sep 17, 2020 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm

Comments

@marcusolsson
Copy link
Owner

marcusolsson commented Sep 17, 2020

The tooltip is being loaded for every bucket on panel refresh, leading to poor performance for large time ranges.

From the Chrome DevTools:

Screen Shot 2020-09-17 at 09 50 29

All the small bars under Heatmap are Tippy updates.

Might be worth looking into making the Tippy instance a singleton: atomiks/tippyjs-react#42 (comment) or switch to a different tooltip library.

Offending lines of code:

<Tippy
key={i}
content={
<div>
<Tooltip
bucketStartTime={bucketStart}
displayValue={displayValue}
numBuckets={numBuckets}
tz={timeZone}
/>
</div>
}
placement="bottom"
animation={false}
>
<rect
x={x(startOfDay.valueOf().toString())}
y={Math.ceil(y(minutesSinceStartOfDay))}
fill={colorScale(d.value)}
width={cellWidth}
height={cellHeight}
/>
</Tippy>

@marcusolsson marcusolsson added the kind/bug Categorizes issue or PR as related to a bug. label Sep 17, 2020
@marcusolsson
Copy link
Owner Author

The Tooltip in @grafana/ui performs better, but has other issues.

Tippy
tippy

Grafana Tooltip
grafana

@marcusolsson marcusolsson added the priority/awaiting-more-evidence May be useful, but needs more support from other users label Feb 28, 2021
@marcusolsson marcusolsson added priority/backlog Useful but not being worked on and removed priority/awaiting-more-evidence May be useful, but needs more support from other users labels May 31, 2021
@marcusolsson marcusolsson added priority/important-longterm and removed priority/backlog Useful but not being worked on labels Mar 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm
Projects
No open projects
Status: 📅 Backlog
Development

No branches or pull requests

1 participant