Dash force compile

Hi all, I have got my dash_force_compile in the AppDaemon.yaml file set to 0 however I am still finding that when I navigate to different dashboards sometimes it takes a few seconds and other times its instant. I change the setting to 1 and it doesn’t seem to have any affect. Appdaemon.yaml as follows

AppDaemon:
  logfile: STDOUT
  errorfile: STDERR
  logsize: 100000
  log_generations: 3
  threads: 10
  time_zone: Australia/Sydney
  api_port: 5000
HASS:
  ha_url: http://10.0.0.61:8123
HADashboard:
  dash_url: http://10.0.0.61:5050
  dash_force_compile: 0

I don’t have a lot of widgets in each dashboard so I don’t understand why it takes so long sometimes.

My dashboard file settings are as follows

title: Home Panel
widget_dimensions: [10, 10]
widget_size: [12, 12]
widget_margins: [0, 0]
columns: 100
global_parameters:
    use_comma: 0
    precision: 1
#   use_hass_icon: 1

Ultimately I won’t the dashboards to navigate through each other as quickly as possible.

there are a lot off things that have to do with how fast a dashboard loads.

  1. first time compilations and if you have changed something on any dashboard setting
  2. network speed
  3. how busy the dashboard server is
  4. how busy HA is
  5. the device that loads the dashboard can be more or less busy
  6. the browser from that device could be slower and faster depending on the cashed data
  7. if you have any info that relates on a network site (rss, a weather map, etc.) then also internet speed and the speed from those sites
  8. wifi conditions if its a wifi device
  9. your router and how its configured

so its hard to tell what is the slow down in your case.
on my tablets i gave up to try to have high speed. there is always a little delay.
i designed my devices so that i have the most important info on the main dashboard, there is the option to go to other dashboards, but its rarely used. (unless i am on my PC which is a lot faster)

To add to what Rene says, the log will show you how long the actual compilations are taking.

1 Like

Thanks @aimc @ReneTode I’ll look into what you have both said and see if I can get things a bit snappier. I do have a couple HTML links as well as during my testing I haven’t been cleaning my dashboard files so I get that and see if I can speed things up. Cheers

1 Like

Hi all,

Just to bring up an old topic of mine. I have cleaned up my dashboard files and as @ReneTode mentioned, depending on what device etc is dependant on the speeds of the dashboards loading.

My question is, I’ve got HASSIO running on a RPi3 with the official 7” touchscreen and I’m wanting to mount that on my wall as an all in one device. I’m wondering, is there a way to further increase the loading speeds by loading the dashboards more like local files rather than as a “website”?

no thats not possible, because the program needs to built up connections.
the dashboards dont get saved as 1 complete file.
maybe that @aimc can think of a way to speed that up?
but i think that the loading on the RPI will be slow anyway. (i used it myself and even the most simple pages took longer then on my tablets)

You should not be using force_compile if everything is setup and running - that would make things a lot slower. Also, if you are using passwords that can slow things down too.

1 Like

Thanks for the response @aimc @ReneTode. I agree, its definitely much faster on my galaxy tab compared to the RPi. I have also removed the force_compile but seems to be the same amount of lag. Looks like it’s something im going to have to accept.

I was just curious as to how when loading in the HASSIO front end and you changed tabs there its so instant vs changing dashboards in HADashboard. I’m not a programmer but I’m imaging its just the way HASSIO is built vs Appdaemon.

I don’t know much about hass.io but I assume it’s because all the tabs are loaded at once and switching between them doesn’t require anything new to be loaded. I planned to do this on HADashboard originally, but didn’t see the need as in most cases pageloads were very fast.

opening a few tabs in the browser and load different dashboards in there would also make changing fast.
so thats probably happening with the ha/hassio frontend. (like andrew already said)

but i dont think its a good idea to have multiple dashboards opened on a pi, where you also have everything running. (it would probably use to much mem and cpu and cause trouble)

Any chance this could end up back on your list :slight_smile:

Yeah i see what you’re saying. I’m running a raspberry pi 3 b+ with hassbian and hadashboard in a chromium kiosk mode so i’d be curious to see how it would handle it.

You are the only person that seems to have issues with a slow load - I suspect that something else is going on here - can you show me a log of a dashboard load? I want to see how long the compile is taking. Also, are you using password security?

no there have been more people who wanted it to load faster.
loading dashboards on cheap tablets and on RPI is absolutely not really fast, but there are to much things that make it slow down that you cant say its the dashboard itself.

but preloading all dashboards that are in a navi wont make that a lot better. you just get an even longer loading time at first and then the option to switch between screens faster.
but on cheap tablets and RPIs it would cause other trouble, so i dont think its worth to try to create such an option.

@akkaria if you are curious how that would work out, the use a browser on the tablet and or RPI and preload all the needed dashboards in different tabs.

As @ReneTode mentioned below, i think a few people are having this issue and i feel like its gotten worse with the AppDaemon 3 release as ive obviously been taking note of the load times. I will however send you a copy of the log when i get home this evening and would appreciate your help. And no i dont have any password securities.

I’m running 2 tablets at home. One which is the RPi and screen attached and i did this because i thought running “locally” would be faster but i also have a Samsung Galaxy Tab A running Fully accessing Hassbian on that same RPi and it is definitely alot faster.

no its absolutely not worse in AD 3 then before.
and most people just realise that ist not the problem from the dashboard but a lot of other stuff that influences the loading speed.

RPI with a screen is no tablet :wink:
i dont know what you are saying here:

but i also have a Samsung Galaxy Tab A running Fully accessing Hassbian on that same RPi and it is definitely alot faster.

is the RPI faster? if yes then that is obvious because the RPI doesnt need to use wifi to get to your server if setup right
or is the samsung faster? if yes you can draw the conclusion that your RPI doesnt have the capability to load dashboards fast.

there are a lot of things that influence the speed of loading.

  • do you use an outside dnsserver to connect to HA? then internet speed, DNS server speed and network speed are a part of the time
  • network speed, the amount of devices in it, what other things that use the network, if you use wifi, what kind of wifi, wifi from neighbours, etc. are all factors of it.
  • the capability from the device, memory, cpu speed, graphic card, etc. are also parts that influence things.

do you want to know the real speed?

  • connect the dashboard with a cable to your network
  • connect a pc with a cable to your network
  • connect the dashboard locally to HA
  • then load the hello dashboard without a skin.

that is something that is loading fast! very fast!
everything that is slower then that is not because of the dashboard server, but because of all other influences.

on my pc with ethernet my dashboards load fast. on my tablet with wifi on the wall it takes a while.
thats because its a cheap tablet and because wifi ALWAYS is slower then ethernet.

I wish i could agree with you but i am basing this on the fact that i have made no changes to my dashboard for a while and then after updating to AppDaemon 3 i noticed slightly increased load times. If i had added anything else at the same time i could at least remove that to see the cause.

Out of curiosity what are normal load times? Maybe im just being pedantic and its as normal as everyone else :wink:

Lol sorry i shouldve been more clear. The Samsung is definitely faster, i just meant that i was running Fully Kiosk and accessing HADashboard on the RPi so i’ve drawn that conclusion.

In response to your questions, i am running HA completely local, no DNS servers and all connected via Ethernet to my network other than the Samsung tablet and it is all connected as you have mentioned in the “real speed” scenario.

What is weird is using my desktop or laptop i have found that it is slower than the tablet running on wifi even. So something is obviously going on in my config causing it to lag. I will review my logs and post it here to see if we can find the issue. It definitely sounds like my config is doing something funny(or not so funny).

fractions from seconds on my pc without skins. 5 to 10 seconds on my cheap tablet with a skin

difference in loading speed with pc, tablet, laptop are for sure not showing up in your logs.
the dashboardserver will handle all calls exactly the same way, because it can only handle things 1 way.
the server doesnt even know if you use a pc a tablet and or what type of browser you use.

So something is obviously going on in my config causing it to lag

for me it is obvious that it is not something in your dashboard, but something in your network/devices/browsers.

you state that the dashboard loads faster on the tablet then on the RPI. so it can ONLY be that the RPI has a slower graphic card/CPU/memory/etc. and that is causing the delay. so you will never get it at a higher speed at the RPI. no matter what you try.

by the way, did you set out dash force compile?
that will speed up things with complicated dashboards. but you can only use that if you are ready with developing.

fractions from seconds on my pc without skins. 5 to 10 seconds on my cheap tablet with a skin

I’m definitely not getting fractions of a second on my PC, probably 2-3 seconds on the Samsung tablet and testing on an old iPad mini i’m getting the same as you at around the 5-10 second mark.

difference in loading speed with pc, tablet, laptop are for sure not showing up in your logs.

What i meant by this is i feel like there is maybe a component or process when loading that is maybe causing the lag.

I am not running force_complie as Andrew mentioned earlier that i shouldnt. Should i be adding it? If so can you copy the code to show me exactly how i should be writing it in my appdaemon.yaml file because when i did this before i actually noticed no difference.

What i might do is i’ve just purchased a new RPi3 B+ and i’m going to do a fresh install and slowly re add all my config files, do a test with out any skins and slowly re introduce it all and see if i can do a bit of process of elimination.