UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.61k stars 430 forks source link

Adaptive Dashboard is way slower than normal UI minimalist dashboard. #1222

Open DanniDesign opened 1 year ago

DanniDesign commented 1 year ago

Describe the bug Using an Adaptive Dashboard is very slow. From loading the page to using it on a android tablet dashboard. I compared both the Adaptive and UI minimalist normal dashboard and the normal UI minimalist dashboard worked flawlessly and the adaptive dashboard had to load like 4 seconds before i could see it and using the dashboard on a tablet is just slow and the buttons lag a ton.

Expected behavior I expect the adaptive dashboard to be as clean and as fast as a normal UI minimalist dashboard.

Freshhat commented 1 year ago

+1 i also noticed that behavior. On my iPhone the performance is ok, but if i open the Dashboard in "Desktop" Mode where also on the right side the Popup (State Switch Card) is displayed then it's really slow. Specially when changing views.

Is there something what we can provide? Browser Traces, etc.?

basbruss commented 1 year ago

I think the lag is caused by state-switch and layout-card both do lazy load all resources. At least that behavior is mentioned multiple times on the community forums and respective Github pages. The only thing that the Minimalist side could optimize is to ditch the popup animation. But I don't think that will fix it.

basbruss commented 1 year ago

Another thing that I noticed is that you can improve performance after the initial load by loading the modules as extra frontend modules instead of by the resources.

remove the URL from the resources page and add it to the configuration.yaml

frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js
    - /hacsfiles/lovelace-layout-card/layout-card.js
    - /hacsfiles/lovelace-state-switch/state-switch.js