dwains-lovelace-dashboard icon indicating copy to clipboard operation
dwains-lovelace-dashboard copied to clipboard

Dashboard getting slow and unresponsive

Open el97 opened this issue 2 years ago • 27 comments

First of... Great job on V3! I'm experiencing a lot of performance issues. When i try to edit one of my areas the tab starts to lag and slowly stop working. I can't drag the entities around either and it takes a while before the entity is gone when I disable them. After a while everything freezes and I end up with purging the cache and refresh. This is what I'm using: Firefox 99.0.1 (64-bit) I7-8086K RTX 2080 Ti 32 GB RAM

el97 avatar Apr 26 '22 21:04 el97

Could you try using chrome if its the same problem on your computer for me?

dwainscheeren avatar Apr 27 '22 08:04 dwainscheeren

It works better on Chrome and I can drag entities around but there is still some performance issues such as small freezes when I go to edit mode or when I remove an entity.

el97 avatar Apr 27 '22 14:04 el97

Very strange, you are one of the few that have it. How many entities do you got in dd?

dwainscheeren avatar Apr 29 '22 11:04 dwainscheeren

well since all the scenes and such counts as an entity the total amount is a lot. I have managed to disable most of them so only a few of entities are visible per area. The performance issues still persists though.

el97 avatar Apr 29 '22 19:04 el97

The same for me. I'm using chrome (both on mobile and computer) and the dashboard is really very slow. I've a total on 1209 entities image I tried to disable in DD a big part of them, but performances did not change a log.

The things taking a long time to load are the time-based sensors.. but I think they are loaded asynchronously after the page is rendered. Not sure what is happening before which is making image

FYI I'm using a RPi4 with an SSD, but the DB is the standard one in sqllite... not sure is really performant for this kind of calls.

When I try to load a room with fewer time-based sensors, the page global performances are better. https://youtu.be/DCmei7tWl8Q

mmornati avatar May 01 '22 13:05 mmornati

I use the same setup except that I go with MariaDB.

el97 avatar May 01 '22 14:05 el97

A pi4 is not really decent device to run HA on imo. I would rather take a look at an Intel NUC or something like that. But regarding your issue I'm investigating it now as we speak :)

dwainscheeren avatar May 01 '22 14:05 dwainscheeren

It is working very well for everything so far. You just don't have to keep it on a SD card to have good performance. As home assistant should be up all the time I prefer low energy devices.

And you know, the official HA hardware is exactly in the same line as the one we are describing. I think the front should not stress the hw that much. Is just a front to show and control...

EDIT: can be related to the way DD is loading all the entities? I guess it should list all the entities, then match with disable/hidden, and then display. The standard lovelace or the 2.x DD it is only displaying what declared and load very fast? As you can see here, once the dashboard is loading, moving between rooms is working well https://youtu.be/yq8lBz5yqcU

And just as added information: when the dashboard is loading the RPi is doing nothing at all (CPU 0%), I think it is browser/client related

mmornati avatar May 01 '22 14:05 mmornati

Please try 3.1 it must be a lot faster. Also you now can hide or disable all entities in an area with 1 button click.

dwainscheeren avatar May 11 '22 10:05 dwainscheeren

Please try 3.1 it must be a lot faster. Also you now can hide or disable all entities in an area with 1 button click.

~~The update isn't available on hacs yet.~~ I have tried out 3.1 and it is indeed much faster. But there is still some issues when it comes to edit mode. It takes some time before an entity is hidden and when it happens, all the sensors refreshes which takes some performance hits. I am able to use the dashboard for a bit longer but eventually the tab slows down and it ends up being unresponsive. So there is improvements that makes it more reliable but as of for now I can't use the dashboard when the tab ends up unresponsive. On the other hand I am able to move entities around as I should be able to which is great. I can also see that it works on chrome almost flawlessly so it only occurs on Firefox for me.

el97 avatar May 11 '22 10:05 el97

Seems a bit faster... Need to check with dev console to have data... But I trust you if you say it is really much faster. 😉

Thanks for your job!

mmornati avatar May 13 '22 06:05 mmornati

I am having similar issues, for example, I am trying to change the card entities of one of the entitie and I get this: image Also, to load the state history it's very slow, and the worst is that it is making all HA very slow, not only just the Dashboard. Any idea of what could I do to solve it ?

lbouriez avatar May 25 '22 19:05 lbouriez

@dwainscheeren , if it can help, I think it's related to the issue that ban us, I get this error:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:146
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 7:54:10 PM (5 occurrences)
Last logged: 7:54:53 PM

[139643634816384] Error handling message: Unauthorized (unauthorized)

lbouriez avatar May 26 '22 01:05 lbouriez

I installed the dashboard last week, and it's very well designed. I'm liking it a lot, however I am also have a problem with the dashboard loading slowly.

I've attached a video recorded using Chrome with version 3.1.1, and you can see it takes about ten seconds before the page is fully loaded: https://user-images.githubusercontent.com/890714/170471352-1ee30168-b1c3-4568-9950-9d1459ac8ba4.mov. As a comparison my existing lovelace dashboards (that I want to replace) load instantly.

There seem to be four stages:

  1. The home assistant sidebar appears (seen at 4 seconds)
  2. The dashboard cards appear (seen at 6 seconds)
  3. The sensor cards history is updated (seen at 14 seconds)
  4. The people/status card is updated (also seen at 14 seconds)

As the page loads so slowly this makes the dashboard frustrating to use. I understand that the sensor cards history will be slow to load, and that's fine. My expectation is that the dashboard is loaded immediately, and that the status and history is updated as the data arrives from home assistant.

I am also seeing the dashboard is very slow when editing the cards, taking several seconds for the edits to appear.

The performance when the dashboard has been loaded is great, for example when switching between rooms. Let me know if you need more information or I can assist. Thanks.

rtitmuss avatar May 26 '22 10:05 rtitmuss

How is it when you edit the rooms through the UI ? This is where I get the more issues :/

lbouriez avatar May 26 '22 11:05 lbouriez

Editing the rooms is slow too and can take several seconds after saving the change, but I will be doing the occasionally, so I'm less concerned about that.

rtitmuss avatar May 26 '22 11:05 rtitmuss

What kind of device is running HA, and what device are you viewing the dashboard with?

dwainscheeren avatar May 26 '22 11:05 dwainscheeren

My HA is running on a Raspberry PI. I saw your comment earlier that this is not a decent device, but I don't have performance issues with other dashboards in HA. I'm fine with the history graphs loading more slowly than the rest of the UI. I'm seeing slow loading/editing on both a Macbook Pro with Chrome, and also on Android in the Home Assistant App on a Pixel 3.

rtitmuss avatar May 26 '22 12:05 rtitmuss

My HA is running on a Raspberry PI. I saw your comment earlier that this is not a decent device, but I don't have performance issues with other dashboards in HA. I'm fine with the history graphs loading more slowly than the rest of the UI. I'm seeing slow loading/editing on both a Macbook Pro with Chrome, and also on Android in the Home Assistant App on a Pixel 3.

I am running on a NUC i7 and the graph are loading slowly, I am being banned when I modify too much the rooms.

lbouriez avatar May 26 '22 12:05 lbouriez

There seem to be four stages:

  1. The home assistant sidebar appears (seen at 4 seconds)
  2. The dashboard cards appear (seen at 6 seconds)
  3. The sensor cards history is updated (seen at 14 seconds)
  4. The people/status card is updated (also seen at 14 seconds)

As the page loads so slowly this makes the dashboard frustrating to use.

I love this dashboard, however I am experiencing the same after upgrading from v2 to v3. Is upgrading hardware the only way to speed this up? v2 seemed much quicker for some reason.

prjcarr avatar Jul 14 '22 06:07 prjcarr

I think it's the way the page is loaded. If you have many entities (as i do have) und you start excluding them from DD, the entities.yaml is growing fast and DD is getting slower and slower. If you have a fresh entities.yaml its much quicker.

StefanDorschu avatar Jul 24 '22 02:07 StefanDorschu

Was there ever any resolution for this? I started using Dwain's Dashboard about a week ago and really like it, but yeah, it's really slow (especially when making edits to it). I'm running on a RPi 4 8GB RAM, with HA on an SSD, with about 300 entities in total.

joshnl1977 avatar Dec 24 '22 22:12 joshnl1977

Any news ?

yarosman avatar Dec 10 '23 12:12 yarosman

My DD is painfully slow now. I only use a handful of the entities that are available on each page, and it seems like all these entities are bringing it to a crawl. Is there any way to optimize this?

Surgikill avatar Mar 04 '24 18:03 Surgikill

did it become slow after you made the manual update to make the icons visible again?

DennisAppelman avatar Mar 04 '24 18:03 DennisAppelman

did it become slow after you made the manual update to make the icons visible again?

My icons aren't visible, that's another issue I am trying to troubleshoot. Really, I don't see why DD needs to keep track of every entity.

Surgikill avatar Mar 04 '24 18:03 Surgikill