home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.07k stars 2.78k forks source link

Speed degradation navigating to subview in 2024.8 #21529

Open Mariusthvdb opened 3 months ago

Mariusthvdb commented 3 months ago

Checklist

Describe the issue you are experiencing

some UI speed degradation can be noticed when navigating to subviews. I have quite a few of those and all are navigated to by means of a grid (8) of buttons in a view. Since I use yaml, they are stored in a separate dashboard folder in the share and configured like below

this has always been very swift.

what happens now, is when I click any of the buttons, I can see the Title of the first in this list Alarm instellingen always, and then quickly followed up by the actual target subview. depending on the subview this takes longer on some than on others. eg a simple entities card is very quick (and yet i can see title change, but a more involved subview, like the one with all batteries in an auto-entities card takes more, and then the 'wrong' title remains in view until the target subview is fully loaded

Describe the behavior you expected

same responsiveness like before 2024.8

Steps to reproduce the issue

  1. see description
  2. ...

What version of Home Assistant Core has the issue?

2024.8.0b0

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Any, Chrome, Safari on Mac

Which operating system are you using to run this browser?

Sonoma 14.5

State of relevant entities

No response

Problem-relevant frontend configuration

views: #!include_dir_merge_list ui-sub-views

  - !include ui-sub-views/subview_alarm_instellingen.yaml
  - !include ui-sub-views/subview_alle_lampen.yaml
  - !include ui-sub-views/subview_aqi.yaml
#   - !include ui-sub-views/subview_automaten.yaml Nu via /config/automation/dashboard
  - !include ui-sub-views/subview_batterijen.yaml
  - !include ui-sub-views/subview_bluetooth.yaml
  - !include ui-sub-views/subview_boilers.yaml
  - !include ui-sub-views/subview_buienradar.yaml
  - !include ui-sub-views/subview_cloud_remote.yaml
  - !include ui-sub-views/subview_computers.yaml
  - !include ui-sub-views/subview_netwerk.yaml
  - !include ui-sub-views/subview_energie_grafieken.yaml
  - !include ui-sub-views/subview_energieprijzen.yaml
 etcetc.

Javascript errors shown in your browser console/inspector

No response

Additional information

Aug-01-2024 12-39-07

Mariusthvdb commented 3 months ago

btw, also experiencing speed degradation on the helpers page in /config/helpers especially (already suffered issues on entities, ) Somehow the the Dashboards in general struggle more than before

silamon commented 3 months ago

Try out safe mode for this one and see if it reproduces.

Mariusthvdb commented 3 months ago

uhm, I cant.... that view consists of custom:button-card buttons in the grid to navigate to the subviews... the view is useless in safe mode

I can see some improvement in speed on the Helpers page, though still the degradation is very obvious. And entities still empty...

useless screenshot.. sorry:

Scherm­afbeelding 2024-08-01 om 22 40 04
silamon commented 3 months ago

Would you be able to setup a small example with no custom cards? You did describe the issue very well, but it's hard to reproduce based on that.

Mariusthvdb commented 3 months ago

sure, Ive made that grid into type: button

I believe it illustrates what is happening: even though the title of the target subview now shows faster (if you look closely there still is a small delay) the subview itself can take some time (and more than before), depending on the content of course.

Eg, the battery page has a few auto-entities, and that needs to be calculated as you can see. Right now, it shows the red flag on the non-existing cards. But, in regular operation, it is the title of the subview taking that same amount of time (and, while the subview is calculating its content, the first op the subview;s title is displayed)

Aug-03-2024 10-09-07

I am aware these are custom cards in the content. The issue here is not that about that content though, but the erroneous subview title showing. Why doesn't it first find that correct subview before starting to render the content? Or show a 'loader'. it just silly it's show the top of the subviews listed in the folder. (mind you, it also shows the top of the list if one enters an incorrect path)

As you can see it also not a matter of caching the view, as re-visiting the same Battery page again takes the same amount of time


back to normal, with both custom and core button grids

Aug-03-2024 10-33-29

silamon commented 3 months ago

And do you see a speed degradation when you have a view without custom resources that has a navigation to a subview without custom resources?

To extend, that's where it starts for us to see if it's a bug or not.

Mariusthvdb commented 3 months ago

the lighter/smaller the subview gets, the faster the correct title of the target subview is displayed.

However, it remains visible, even in a blink, that the title of the first subview in the list is displayed before landing correctly.

Why does it do that? Why doesnt it not directly show the correct title?

It would be logical that the more complex pages would take longer to display, but the title could either stand directly, or, the display could wait showing that title, until the subview would be loaded.

The 'in between' display of the title of the first subview in the list is just wrong.

Compare it with regular views, where this does not happen either, no matter the size of the view, or the content.

Anyways, this is core only, nothing custom cards on the subview, using default theme. Note the 'Alarm instellingen' shows first (and also note there is no back arrow when it does) before '< Verlichting'

Aug-05-2024 08-17-28

just as a confirmation of the observation concerning the 'top of the list subview': I edited that list to start with the

  - !include ui-sub-views/subview_batterijen.yaml

and moved the first 3 down the list, and then the Batterijen is displayed before displaying the Verlichting subview. Proving the system starts showing with the top of the list subview in the overview listing of the Subviews dashboard as posted in the OP

The effect does Not show when moving from a subview to another subview btw, even when fully loaded with several bigger custom card configs and theming other than Default.

I have floorpan subview landing at 4 custom tabbed card s. All of its tabs navigate to dedicated subviews per room. Not a single of these transitions experiences the issue we get when navigating from a regular view to a subview. The back arrow doesnt even blink or stutter. It's really robust this way.

Aug-05-2024 08-55-26

github-actions[bot] commented 6 days ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Mariusthvdb commented 6 days ago

Keep