# Optimizing loading times in dashboards with Prometheus data source

**URL:** <https://community.grafana.com/t/optimizing-loading-times-in-dashboards-with-prometheus-data-source/90525>\
**Category:** Prometheus\
**Created:** [June 28, 2023, 1:57pm UTC](https://community.grafana.com/t/optimizing-loading-times-in-dashboards-with-prometheus-data-source/90525 "2023-06-28T13:57:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseph2374](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@joseph2374](https://community.grafana.com/u/joseph2374)\
**Post date:** [June 28, 2023, 1:57pm UTC](https://community.grafana.com/t/optimizing-loading-times-in-dashboards-with-prometheus-data-source/90525/1 "2023-06-28T13:57:12Z")

</div>

- _What Grafana version and what operating system are you using?_  
Grafana v9.4.7 (but we can upgrade anytime), container version on Debian host
- _ **What** are you trying to achieve?_  
I am trying to optimize the loading times in my Grafana dashboards by reducing the redundant calculations of the metric `avg_over_time(probe_success[$__interval])`.
- _ **How** are you trying to achieve it?_  
I am looking for a method to calculate the metric value only once and then use it across multiple panels in the dashboard. I am considering the use of variables or other techniques to achieve this optimization.
- _What happened?_  
Currently, each panel in the dashboard independently executes the `avg_over_time(probe_success[$__interval])` metric, resulting in redundant calculations and significantly increasing the loading times of the dashboard.
- _What did you **expect** to happen?_  
I expected to find a way to optimize the loading times by performing the calculation of the metric only once and then reusing the value across all panels in the dashboard. This would help reduce the overall loading time and improve the performance of the dashboard.
