Longtime statistics from current cause high cpu usage

Longtime statistics from current ampere cause high cpu usage.

If I define a statics sesnor from a shelly energy sensor to get the mean of a month my HA cpu usage is very high so I could not use the fronend.

- platform: statistics
  unique_id: sts_energie_gesamt_l1_strom_mean30
  name: Energie Gesamt L1 Strom 30 Tage Durchschnitt
  entity_id: sensor.tmp_energie_gesamt_l1_strom
  state_characteristic: mean
  precision: 1
  max_age:
    days: 30

If I use average_linear the cpu is even higher. So I think the statistics intergration must calculate over many values is the root cuase. Any idea to hanbdel something like a mean over a month?

Thanks, Steffen