Heavy CPU load while displaying graphs

I’m fighting with CPU load while using grafana with influxdb on Raspberry Pi and openhabian. I’m using it for temperature graphs, and showing them in habpanel. It looks like storing value into databes works fine. Problem is when I want to display graphs.
My CPU load looks like this:

SELECT mean("value") FROM "Balcony_Humidity" WHERE $timeFilter GROUP BY time(10m) fill(none)
Also when I’m using curl for store graphs into pictures, usualy some of them are empty.

I already used htop to find which process cause this issue. It was grafana. I’m not sure if both CPU was on 100%, but it looks like it completely freeze whole openhab for a while. PaperUI and Habpanel wasn’t accesible during this peaks. When I removed displaying graphs from Habpanel, CPU is fine and there is no peak for last week.

Display graph:
<img width="500" height="250" src="http://localhost:8030/render/d-solo/A6UHIMggk/pressure?panelId=2&orgId=1&tab=general&refresh=30m&width=500&height=250&tz=UTC%2B02%3A00" />

Any idea what I have to look for?