Closed thermseekr closed 3 years ago
Could dig a bit more this morning, this looks like a multiple cause issue. Reverted back to HA 0.114.4, got rid of a few ping binary_sensors which were populating the log as unable to update, and did some other tweakings: each step seems to have improved response a bit. Tried with the wife's MacBook which has not been upgraded from a long time, and response time is normal. Sure is, it's not related to button-card.
Regards, Tales
I was about to investigate this, but glad it's not related to button-card as those issues are the worst to debug :)
:))) Thank you for all you do to make button-card such a great addon. Will let you know if anything new comes up.
Hi, me again.
I'd like to say I have good news, but I'm not sure I can say that. Lol. Come with me, sorry for the long post...
My ui-lovelace.yaml is currently around 4200 lines. My frontend has 4 views. Apart from the graphs and a few other cards, 100% of it is built with button-card. I just love it! Everything was running smooth and super fast on the MacBook. On the phone (iPhone 7 Plus) companion app was not the fastest but it was ok. Everything was nice, then the upgrade frenzy started.
I replaced the super old Acer Aspire One Celeron based netbook server running Hassio on Ubuntu for a less old Lenovo Thinkserver T140 Xeon based server running HassOS on VMware ESXi. This upgrade happened by the time home assistant was on V0.113, I noticed a considerable speed increment on ha core restarts and operation was normal both on Safari and Chrome, and also on companion app.
Then at the same time:
On the phone: companion app became almost unusable, both safari and chrome very slow On the Macbook: safari very slow, chrome pretty normal, very fast
Wife's iPhone XR on iOS 13.7: companion app same version as mine is super fast, also Safari. No chrome installed Wife's Macbook with older macOS: Safari normal, no chrome installed
WHAT I DID: commented out most of ui-lovelace.yaml leaving only a small view with a few toggle buttons and graphics, and everything went alive again, instant responses, making me think the last updates from Apple interacted in a bad way with home assistant or with button-card in particular. Do you think that it makes any sense? Would you like to take a look at my ui-lovelace.yaml to see if I'm doing something very stupid?
I'm still gonna try from chrome under windows 10 and also will try android companion app with a galaxy A50.
Thanks a lot for any reply. Cheers! Tales
With the number of users on IOS14 running heavy setup, I'd be surprised that you'd be the only one with that issue if it was related to button-card. I'm running a heavy setup also and upgraded to IOS14 with the companion app and I don't have issue so it might be related to your configuration. If you're using button-card templates, I'd disable them one by one and see if it improves something until you maybe find one with a problem.
Also, make sure you're not using triggers_update: all
.
Also, safari is 💩
I do use a considerable number of templates, if I remember well also a few nested ones (template inside a template). Will start disabling them to see what happens. There are no triggers_update: all
.
About Safari, I have a lot of passwords in Keychain ad that's the reason I still use it, but it's about time I dump it for good.
Thanks for the feedback and suggestions. Much appreciated.
Regards, Tales
Removing the templates changed nothing. But I start to notice other weird things happening in my setup. I'll start to trace back my update path from the last two weeks. Thanks for the help.
I'm working on debugging a similar issue. Since updating to iOS 14 / Safari 14, Lovelace is slow.
I have about 24 button-cards on my main Lovelace page. If I comment out the YAML include (all my buttons are in a separate file), Lovelace loads nice and speedy. Not using trigger_updates: all. I am using templates, and I do even have some nested templates.
Haven't found a cause yet, other than my debugging is pointing toward button-card.
Hey Ron,
Have you tried loading Lovelace with Chrome? On my MacBook it loads fast and reaction to clicks is immediate. I was puzzled initially because on the iPhone even Chrome is slow, then Google told me all browsers in iOS use Safari's rendering engine. I think the same is true for the Companion App, it must use the same engine.
I was about to conclude Safari 14 was causing the problems, but my iPad is on iOS13 and seems to have the same issue. I couldn't test it properly yet, will post here when I do.
I'm running IpadOS 14, so with safari 14 and have 50+ button-cards on my main page and there's no issue for me. On my side I have issues with chrome/home assistant app on Android (but it seems related to my phone, not to chrome itself). No problem with FF though on Android, and none on MacOS with Chrome either
Are you using custom header by any chance? Seems like the development has stopped and introduced some issues in the latests version of HA? It might be generating some side effects with button-card.
I was, but ended up converting all my buttons to native Lovelace, as my use case is covered by Lovelace now.
-- Ron Heft On Oct 17, 2020, 11:11 AM -0400, Jérôme W. notifications@github.com, wrote:
Are you using custom header by any chance? Seems like the development has stopped and introduced some issues in the latests version of HA? It might be generating some side effects with button-card. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I do not use custom header.
Haven't been able to test a lot, but just installed last companion app on both mine and wife's phone. On her (XR iOS13) responses are faster than on mine (7+ iOS14), what is expected considering her hardware is newer and faster. But there's a delay which didn't existe before, and shows more clearly on older/slower hardware. Gotta be something related to 0.115, I don't see any other possibility.
It's something I can live with, I'll keep paying attention to see is something surfaces that would give me a hint on what changed.
It's ok to close this issue if you want.
Thanks a lot for your support.
Hello. Some update here. My wife's iPhone XR was recently updated to iOS14. After the update companion app became slower also on her phone. Not as bad as mine iPhone 7+, but noticeably slower. So far my conclusion is that an iPhone running iOS14, which brings together Safari 14 rendering engine, when running a button-card heavy setup will struggle to draw the screens and respond to clicks. The newer the hardware, or the less button-cards on a screen, smaller the problem.
"[On IOS14] In the performance department, Apple says its browser offers up to 2x faster JavaScript performance than Chrome on Android thanks to a ‘blazing-fast JavaScript engine’." Apparently not 😛
I'm going to investigate.
Maybe in iOS 14.2 😂
Em qua., 4 de nov. de 2020 às 15:07, Jérôme W. notifications@github.com escreveu:
"[On IOS14] In the performance department, Apple says its browser offers up to 2x faster JavaScript performance than Chrome on Android thanks to a ‘blazing-fast JavaScript engine’." Apparently not 😛
I'm going to investigate.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/custom-cards/button-card/issues/375#issuecomment-721888839, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPTVGBEEBJLCPALNEAEAEDSOGJ5ZANCNFSM4R3D6GIQ .
I've updated how the clicks are handled, would you mind trying the latest beta please?
No changes unfortunately. I'm not sure it's click related, judging by how long it takes to draw and update the screen I think it's more related to the rendering itself. Thanks for trying!
I have introduced more perf upgrades, but it's not yet released. I have massive issues on my OnePlus 7T Pro also with chrome (but not with chrome devel version) so it might be the same as you. Ex: when I need a popup displayed (with browser-mod) it takes 10 sec at least to give me back the control over the windows... But that doesn't happen on my other android tablet with the default chrome version, so who knows... And it doesn't happen on my button-card test env...
This one is quite hard to tackle down...
Are you using layout-card? I can seem to reproduce using layout-card?
Edit: Actually, still slow without...
Not using layout-card. There are more reports about slowness here: https://community.home-assistant.io/t/app-is-ridiculously-slow-on-iphone-6-running-ios-14-1/232678 Most likely not related to button-card, I asked if the OP is using it but he didn't reply. This is very strange...
After weeks running on ios 14 I could notice my phone is considerably slower also in other scenarios not related to the companion app or button-card. On the companion app, I worked around the issue dividing my frontend in more views so each of them get smaller and lighter. So for now it's back to usable condition. Thanks for all the time spent looking into this.
Safari and Apple are so bad and so closed, I'm sorry for that :/ But it gave the opportunity to improve the card speed by a bit and that is positive 😊
Don't worry, that's not on you. And things are working much better after I split the views a bit. Also, iOS 14.2 seems to have improved things a bit further. Thanks a lot and keep safe.
Here I use button-card inside a switch-card and all inside a layout-card. I noticed that all the dashboards on iOS were fast, but on the dash where I had the switch-card, it was slow. I removed the switch-card and it solved. Conclusion: In my case, the problem is not the switch-card or button-card, but both together. Maybe other users don't use the switch-card so they can use another card that generates the same problem together with the button-card.
PS: switch-card works fast with others cards.... the conflict is with button-card..... in my case.
PS2: is not switch-card... the name is state-switch...... I´m using to show button-card by user.... that´s the problem, button-card inside state-switch by user
Now is the 2023 and the problem is still here. On MacBook HA is extremely slow on Safari but fast on Chrome. On iPhone14 Pro it is SLOW all the time ((((
Yes, it keeps slow also in my system. I never figured it out, what could be the reason. I keep thinking it's Safari. On the iPhone, even other browsers use Safari's engine as far as I know. I tried to use an iPad Air 2 as a dashboard panel at home but it was impossible.
Any updates on this? I didn`t investigate deeper, but my guess is the combination of some of the card will instantly trigger slow. Im running ipados17, I build a sophisticated UI for this ipad in one of the view and after last week I updated more complicated code it instantly become unusable (only this view). And what I did is just adding card in card in card.
Hello all,
My setup: Home Assistant 0.115.3 on HassOS 4.13 running on VMware ESXi, iPhone 7 Plus with IOS 14.0.1, MacBook Pro 2017.
My frontend is virtually 100% built on button-card. A few days back after updating my phone to IOS14 the companion app became so slow that it's almost impossible to use. On the macbook, Safari shows the same slugguish behavior, while in Chrome everything runs pretty normal.
On the phone, if I try accessing through the browser both Safari and Chrome are really slow.
I'm not sure about where to look for a solution. Initially I thought there was something wrong with the Companion App, but then I realized the browsers were also slow on the phone. I though on blaming the phone (iPhone 7 is rather old now) but on the notebook Safari is also slow. I thought maybe there's something wrong with 0.115, but Chrome on the notebook runs OK.
So I'm posting here, is it possible that something's not right about button-card + latest Safari or 0.115 or IOS14?
Thanks, Tales