Web and IOS App frontend hanging on complex screens

I am having increasing issue with different pages in the web interface hanging the tab in the browser (ie full page does not load, and I can’t click on anything in the tab and only think I can do is close that tab so it is like the tab hangs up). This problem is most obvious in the IOS App which is now completely unusable for me. And to a similar extent the web browsers on iPads and iPhones. It is less of an issue in web browsers on PCs, but I suspect there are clues event there that there might be some sort of issue (slow page loads).

The issue has been around to a greater or lesser extent for some time (IOS App has always been less than responsive for some time and with regular hangups that I can only work around by killing the App and reloading), but something has changed in about the last week that has made it much worse. Things that used to work ok (with some delays), no longer work at all on the iPad. Things that have changed in that timeframe : -

a) I upgraded iPad and iPhone from a 16 version of IOS to 17.1.2. I suspect this was the most likely change that caused it. But the issue now also seems to be affecting an old iPad Pro 12.9 1st generation on 16.7.2 (latest version it can take), and it is worse than it used to be on previous versions, but better than 17.1.2 running on the latest newer iPad Pro 12.9.

b) I am a bit doubtful HA core or other changes has caused the issue, because I don’t believe I did any upgrades or changes between when it worked a bit better and when it was much worse. But there is a chance a previous upgrade caused it and I did not notice or something else. I am running the latest versions, including taking the latest upgrade this morning (but this is not the trigger or the fix because issue was the same before) :-

  • Core2023.12.0
  • Supervisor2023.11.6
  • Operating System11.2
  • Frontend20231206.0

This all runs in a ESX virtual machine with lots of CPUs (HP server with 2 CPUs and , lots of core and 8 virtual CPU allocated to the VM) and 16GB RAM for the VM on a server with 256GB. So there are no signs of any resource or CPU issues on the server side, even when looking at CPU resources on the server. I can see some increased CPU on the PC when I hit on of the problematic pages, but it is certainly no maxing out all the cores on the PC.

I have LOTS of entities (over 2000 sensors and 3-4 hundred other entities of various types). But I am strongly suspicious that the issue is more about how much underlying data I am trying to display on any 1 screen rather than the number of entities I have. For example : -

  1. At the moment I can get the IOS App to work at all because it defaults to the “Overview” screen which I think has all the entities. It seems to display, but not all of them and I can’t change to another other screen.

  2. I can get around this issue in say a Chrome Browser on the iPad by using a specific URL to go to another screen. If I go to a less busy screen (eg settings, or a screen I have made with less stuff), all seems to work ok. But if I click on a busy screen like the overview screen that causes the hang, it hangs and beside not displaying the screen, I can’t click on anything else. All I can do is kill the tab, and reload it.

  3. Usually the desktop browsers have less issues (ie there are some screens that cause issues on the iPad that seem to work ok on the Desktop). Though, I suspect there are still signs the Desktop browser is struggling. eg I have one screen that had a whole bunch of 48 hour history entries (maybe 20). Hangs on the iPad, but will display on PC Chrome. But it has a few seconds of “Loading State History” that I think is a pretty good clue that it won’t work on the iPad and sometimes I will get the tab hanging issue.

  4. The issue has always been around (eg IOS App has always been a bit fussy), and strange hangups on the bigger screens on the iPad browsers sometimes or slow to load, but something in the last week has made it much worse. Eg where most of my screen mostly worked on the iPad browser, there are some that I regularly use, that no longer ever work on the iPad.

  5. Issue does not seem to affect Grafana screens, just regular HA/Lovelace.

I have done some troubleshooting to try and isolate the problem, and this seems to confirm that it is related to the amount of data. Right now I have confirmed 2 things that definitly trigger the issue on the iPad : -

  1. The Overview screen which just has all the entities.

  2. Screens with 1 history graph with lots of data. I have confirmed that a screen with just 1 history graph set for 48 hours of history is enough to trigger the issue, but only if the entity is frequently changing (ie every 2 seconds in the case of the entity I have tested with and in case with this entity 24 hours is enough to make the iPad pretty unhappy). But if the entity is only updating once a minute, I can display a 48 hour graph without issues.

From this I a guessing that the issue is something to do with a big with the ability of the browser to handle the data trying to be presented and it would appear that the apple IOS browsers and IOS App have less ability to deal with large datasets than the desktop browser. There are signs the PC Desktop browsers might have similar issues, but the threshold for issues is higher. eg for the history graphs that cause issues on the iPad, there tends to be a delay in display the graph and it shows “Loading State History”. But generally after a few seconds it works, with only the occasional “hang”.

Anyway, I hope this is some sort of bug that can be fixed to make it more robust, and as a clue, it seemed to work much better only a week ago, so there has been some change in the last week (as outlined above).

Further to the post above, I have found an iPad Pro 12.9 that is still running IOS 16.5.1. This iPad seems to operate more like it used to operate before the upgrade to 17.1.2. ie by screens with lots of data. It is far from perfect terms of consistency of speed of display, but they are not hanging up the tabs as much. In truth, it does not seem to be quite as good as it was a week or so ago (which might be I am more closely looking now). But it is definitely better than the ipad on 17.1.2.

It should be noted that one of the fixes for 17.1.2 was an urgent security vulnerability that sounded like it affected the engine used by browsers to display changes. So it might be that that has caused more issues in HA?

Away, I am hoping there is something in the code of HA that can be tweaked to make it less fussy about the browser, and better able to work on the iPad.

Is this a new issue? like since the update to 2023.12 ? My dashboard is almost useless since the update ( See post https://community.home-assistant.io/t/dashboard-super-slow-high-cpu-load/651654 )
If you have a pc or mac with a browser where you can enable the java console, may be you can check if you have a flood of errors there ?

Just a guess: could it be Safari?

For me the problem was in both Safari and Chrome on iPad. And signs of the issue for Chrome, Firefox and Edge on PC. So I don’t think it is specific to 1 particular browser.

There might actually be 2 problems. I know I had the issue with the version prior to 2023.12 because I only did that upgrade this morning, and well and truly had issues before then. Based on what you are saying, I wonder if some of the issues are IOS 17.1.2 related, and some of the issues are 2023.12 which could explain why IOS 16.5.1 is better than 17.1.2, but not as good as I remember (because I now also have 2023.12.

I hope someone can identify a solution, because it makes HA way less useful when you can’t browse some details on the iPad.

Am I wrong that the fruit company devices always use the safari engine, no matter what browser?

This is outside my knowledge area, but from a quick google, it appears you are right.

Google working to run Chrome's Blink on iOS, instead of WebKit.

You are experiencing other problems as well but this might be a part of it…

It seems there has been a bug open for this for quite a while.

This would definitely appear to cover the issue with large history graphs. I am not sure if the issue with the Overview screen is related.

Suggest people log their issue there to help encourage the team to get someone allocated to this.