Pages take longer to load with modular configuration

Has any one else noticed that when you use a module approach that calls yaml files from the dash file it is pretty close. My pages are taking 10-15 seconds to load. The normal config with out using yaml files is quick only second or two. Ha is on on a pi3 and hadashboard is on its own pi3 and using a iPad Pro.

i really havent noticed such a big difference.
how do you call yaml files from the dashboard in your case?

and you always can set:

dash_force_compile: ‘0’

which makes it that the dashboard is only compiled once, and you shouldnt notice any delay anymore.

Yea mine has a long delay that makes changing pages a pain. Would that dash_force_compile go here in the main .dash file? Also, I believe that means it would just not recognize any changes until I force a compile? Would the media_player still be able to update automatically? I like that when Im listening to music it still in sync and I can change the volume or pause it.

title: Control Panel
widget_dimensions: [1, 1]
widget_size: [120, 120]
widget_margins: [0, 0]
columns: 1024

global_parameters:
    use_comma: 0
    precision: 0
    use_hass_icon: 1

layout:
    - include: top_panel
    - include: main_middle
    - include: bottom_panel

it goes in your appdaemon.yaml
and the dashes will still update as usual, they just arent rebuild every time you load them.
and the biggest pain is that you use widgetdimensions 1,1
i am the inventor from using it like that, but because of the delaying i gave that up.

if possible switch to 10,10 or higher you lose a bit of flexibility but gain a lot of speed.

Thanks i apprecaite you pointing that, I can tell a very big difference going from 1 to 10. However Ive been trying to line this up since i read your post directly after you replied hahaha. All of my widgets were even numbers by 10 anyway so you would think i would be able to just knock say 120 down to 12. But it doesnt appear that way.

For example a widget of 120x120 i would assume would change to 12x12 if the diensions changed to 10, 10. I pasted what I have now …

title: Control Panel
widget_dimensions: [10, 10]
widget_size: [12, 12]
widget_margins: [2, 2]
columns: 78

its the margins which get in your way now. :wink:
you had margins 0,0 and now 2,2
off course that throws everything of scale :wink:

That made it a little better but still way off, Ive been playing with columns I think that is messing me up too, it was on 1024 but if I use that or 10 or 80 or 100 it still looks horrible…this is an example of the middle panel

- empty: 14
    - spacer(10x1), garage(24x12), spacer(2x1), living_room_tv(27x12), spacer(2x1), pause_atv(24x12)
    - empty: 14

tyoing that made me realize I need to change the top and bottom panels too. now I can see all the widgets they just look nasty lol. But I think I got way of it now, thank you very much sir!

1 Like

the problem with devolipng that way is the empty space.

it needs to find a spacer on every line if you want to be able to calculate in blocks.
in this line:

    - spacer(10x1), garage(24x12), spacer(2x1), living_room_tv(27x12), spacer(2x1), pause_atv(24x12)

you only fill up the topline leaving all beneath that empty making strange things happen.

better is it to use:

    - spacer(10x12), garage(24x12), spacer(2x12), living_room_tv(27x12), spacer(2x12), pause_atv(24x12)

leaving no empty space and react more predictable.
i tried 10x10 also for a while and i know there must be a bug somewhere but i never got to pinpoint it.
resulting in strange things happening when you get on a multiply from 10 somehow.

given how you are working i suggest this:

title: Control Panel
widget_dimensions: [12, 12]
widget_size: [10, 10]
widget_margins: [0, 0]
columns: 65
layout:
    - spacer(8x10), garage(20x10), spacer(2x10), living_room_tv(22x10), spacer(2x10), pause_atv(20x10)
    - empty: 11

Ah so there may be a bug with 10,10 then. You just helped me immensely, I got the dashboard looking the way it was before the switch with the exception of the bottom panel. Huge differnece in speed! But here is what Im working with, that bar towardsthe top should be on the bottom. you think this would be part of the bug possibly?

main.dash
    #
    # Main arguments, all optional
    #
    title: Control Panel
    widget_dimensions: [10, 10]
    widget_size: [12, 12]
    widget_margins: [0, 0]
    columns: 100

    global_parameters:
        use_comma: 0
        precision: 0
        use_hass_icon: 1
    layout:
        - include: top_panel
        - include: main_middle
        - include: bottom_panel

middle:
layout:
    - empty: 13
    - spacer(10x12), garage(24x12), spacer(2x12), living_room_tv(27x12), spacer(2x12), pause_atv(24x12)
    - empty: 13
    - spacer(10x12), climate(24x12), spacer(2x12), lr_sonos(27x26),  spacer(2x12), power92(24x12)
    - empty: 13
    - spacer(10x12), living_room_light(11x12), spacer(2x12), kitchen_light(11x12), spacer(2x12), spacer(2x12),  movie_light(11x12), spacer(2x12), xbox(11x12)
    - empty: 22

bottom:
layout:
    - main(25x6), bedroom(25x6), remote(25x6), info(25x6)

2 Likes

could very well be so.
its just the kind of thing i experienced.

i must say: i LOVE your design!!

Ah thank you! Ill keep messing with it, if I get her to straighten up Ill let you know. Otherwise Im guessing the 12x12 would have to work

1 Like

Man that sucks, i like that design too but I just can’t get it right with other dimensions, what is bottle neck here the cpu / memory on the hadash pi? Im wondering if moving it to a mac mini would solve that issue?

like i said, dash_force_compile makes that its only created once.
that helps a lot when you are finished.

i think that the biggest issue is that the file gets bigger (more framework) and loading takes longer.
i noticed that its a lot faster on my pc then on my tablet (so wifi and tablets capacity are the biggest weakpoints)

i was just today talkin to andrew to create a possibility to place widgets on coordinates instead of a grid.
it would make developing dashboards like this a lot easier, but i have no idea how that would impact the speed.

at the moment i have fallen back to 50x50 widgets at most.

for most of what you are doing that would work except the bottom part and the top part.
for that you could try if creating a seperate dashboard inside an iframe would make the delay shorter.

Yea I am using the compile 0 theres not enough improvement to be useful, thank you though Ill use that elsewhere. Ill have to just try something else I guess, I like the iframe idea but the bottom buttons are functional
, they navigate to the other pages.

20x20 does not have the bug like 10x10? I can try that I should be able to do that!:slight_smile:

it would like the below?
title: Control Panel
widget_dimensions: [20, 20]
widget_size: [20, 20]
widget_margins: [0, 0]
columns: 51

or widget dimensions may be 6x6? for the 120x120

i only noticed the problems with figures like 10.
i really have no clue what it is but with 10 i got problems mostly around line 10
and i know that how bigger the widgets how faster the dashboards.
so go as small as you need, but not smaller.

so i would say 36, 24, 20, 30 are all worth a try.
remember its working on the edge because the dashboard wasnt designed for that kind of working.

(but i guess you (like me) dont back down for that :wink: )

That makes sense. When using 10 it looked great but I could get that bottom bar to the bottom how it was. That thing is to beautiful not to fight for lol.

I’m about to try 20. kinda don’t wanna waste another three hours changing dashboard files when the issue Is here;)

widget_dimensions: [20, 20]
widget_size: [6, 6]
widget_margins: [0, 0]
columns: 51

if I leave it like this

widget_dimensions: [1, 1]
widget_size: [20, 20]
widget_margins: [0, 0]
columns: 1024

it seems to load a little faster but i havent made any other changes, so for example:

- empty: 140
- spacer(105x1), garage(240x120), spacer(30x1), living_room_tv(270x120), spacer(30x1), pause_atv(240x120)

Does that seem right?