marcusolsson / grafana-hourly-heatmap-panel

A panel plugin for Grafana to visualize hourly heatmaps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tooltip slows down panel refresh

marcusolsson opened this issue · comments

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>

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

Tippy
tippy

Grafana Tooltip
grafana