I was using collapsable [sic] cards, and had 13 of them on my dashboard. I then added title cards to them rather than just titles, with icons, and loading my dashboard slowed by several seconds, very noticeable when previously it was under a second. I switched to expander-card and the problem went away.
I emphasize that this problem isn’t directly with collapsable-cards, because it didn’t arise until I added title cards. But I am using expander-card without the problem and with title cards. FWIW
I had the same issue with the same resolution. 21MB of known devices. This problem is so inscrutable to end users that it probably makes sense to automatically prune the entries in there to keep them under a threshold known to cause frontend lag.
close to 900k lines in known_devices.yaml, size was 4.9MB.
lovelace was unbearable slow, I went quite the same route as I suspected specific UI elements like auto entities as well.
Removed the known_devices.yaml and everything is back on track!