I used custom:digital-clock but I tried this with an entity card and sensor.time as well, with a very similar result.
I like a large digital clock at the top of my dashboard; 6em for the phone and 10em for the tablet. I replaced these with similar values in px (60px, 96px) and the largest contentful paint time in console (I’m using chrome; this is a normal measure of page loading time) went from 1.3 sec to 0.3 sec.
This improvement is really noticeable on my phone if I’m connected with wifi, even if I’m using the nabu.casa link and not homeassistant.local, which I use for seamless access roaming.
I’ve preferred em for web design because it accommodates different screens better, but for sizing a clock, it hardly matters.
YMMV.
Correction: it was font size which unfortunately I didn’t hold constant in my experiment, attributing to em a larger font. But still notable is that a large font size renders a lot slower, in the experiment below, .15 sec vs .7 sec.
I use em almost exclusively to due its dynamic sizing capability, but 1 second due to a simple digital clock is pretty big. Guess I’m experimenting next weekend.
That is true.
The rensering happens on the device and not the server, so you need to look at what can be done there.
An old or underpowered device will be more affected than a new flagship phone.
The large font takes a half second (average .55 in five runs) longer than the smaller font. The gap appears larger when I use custom:digital-clock, which was my normal one and why I was seeing a full second.
BTW, the time lag appears to be present in both the web app and the companion app. My focus was primarily on improving the responsiveness of the companion app, so that I can quickly execute a button.