HA slow loading history

Hi everybody,
I’m a new memeber of the forum.

I write here because I’ve a problem: home assistant is very slow loading history (30-60 seconds).
Som stuffs:

  • HA docker container is enough fast (few seconds between initial HTTP request and final response. I’m using fiddler as sniffer/proxy)
  • my computer is enough fast (intel i7-6700,ssd, 32gb ram…)
  • but chrome/firefox take an huge amount of time in order to show history (I’ve also tried on other computer/tablet…same problem)

I’ve tried to profile history loading with chrome dev tools, below the screenshoot. It seems that there are huge problems about script execution/garbage collection. Any suggestion?

Thank you,
Marco

How big is your home is your home-assistant_v2.db ?

Have a look here:

I’m using mysql, instead of sqlite. My problem is not about elaboration of data from server(I’m using a sniffer, so I know what elaboration of JSON responses take few seconds). Problem is “client side”, but same problem on both computer and tablet,both Chrome and Firefox

1 Like

Hi m-ri,

I have the same issue as yours, I already mentioned it there : Looking at 3 days of history causes >100% CPU usage (Ver 0.83.2)

It seems like the history component is somehow entering a loop while fetching the data, causing this horrible slowness.
This has nothing to do with the database size, which is mentioned everywhere. I did a gigantic amount of exclusion, and the problem still very quickly appears even after a DB reset.

I think there is already an issue opened, but it doesn’t seem to move forward currently : https://github.com/home-assistant/home-assistant/issues/18035

If somebody could help on that, it would be much appreciated :slight_smile:

2 Likes