Good day everyone, when developing a custom data source, how does one properly send huge amounts of data (lets say 20k+ points, required to see sensor data in an energy comp) back to grafana without causing any stutters? I know about the createDataFrame function and the DataFrame type. My query itself seems to be running in about 4-9ms or so. But when grafana does its own processing the entire dashboard stutters slightly when the dashboard refresh occurs. When I let my logic run but return an empty list of DataFrames I get no stutter. But when I do return my data it happens. Does that mean its something in Grafana that I can’t control?
For context, at the end of the query I am simply sending the DataFrame[] back. I cannot share code but I am willing to share some details.
version: Grafana 11
Your query is already fast (4–9 ms), so the stutter is likely happening after the query completes—in Grafana’s frontend processing of the returned frame (DataFrame handling, transformations, field configuration, and rendering), rather than in your datasource query itself.
If your use case allows it, make sure your datasource respects request.maxDataPoints and intervalMs, and downsample server-side before returning the frame. Grafana provides these so a datasource can return an appropriate resolution for the panel instead of more points than it needs to render.
If you genuinely need all 20k+ points at full resolution (which can be reasonable for sensor data), then downsampling may not be an option. In that case, I’d test with a single panel and with transformations/field overrides disabled. If the stutter persists, the bottleneck is likely in Grafana’s frontend rendering pipeline rather than your datasource.
Grafana documents maxDataPoints and intervalMs as part of the datasource query model: