I made a custom component that will keep recent logbook entries pre-loaded in memory. This makes them immediately available when the Logbook panel is opened, decreasing loading time to a couple of seconds.
Thanks for thinking about us, mere users
I have been trying to convince the HA devs to slightly change the way the logbook works, namely: when one opens it, nothing happens until an DISPLAY button pressed. That will let user to select how many days they want to look back, what entity to display (if any) etc. I think it makes sense, especially with such a slow thing as a native logbook. Unfortunately, we are still where we are.
Any chance of having something similar in your component?
Hi, thanks for sharing. Great work, I haven’t tested it yet but I’ll do soon. It’s really sad the main components like logbook/history or recorder don’t get any attention in the main development.
What do you think about a second inmemory recorder to store entities which don’t need to be persistent at disk but would be needed to for the frontend. For example showing a graph current network traffic or helper input_boolean. I haven’t found a solution for a hybrid (inmemory and persistent) database
You are right, the logbook is currently not much of a priority.
A long-term goal of the recorder is to support automating the home (for example with future machine learning components). The logbook and history views are more like auxiliary features, not the very purpose of the recorder.
So the quandary happens when proposed optimizations to the logbook/history can jeopardize the long-term goals of the recorder.
Also, it is working just well enough that so far nobody has been bothered enough to rewrite it completely.
If you have the resources I definitely recommend users install this. I don’t believe its taking that much memory up for me. I believe this will make me much more likely to make use of the logbook for troubleshooting! Thank you.
This would be a nice optionally enabled feature built into the logbook. But I understand it gets complicated.
As generic_thermostat is?
I’m not complaining/flaming/trolling, but that’s a fairly stretched statement. I know it’s all about people making their PRs and unfortunately cannot do this particular bit myself so just keep doing what I do and waiting for better future. Just wanted to state that nobody has been bothered enough to rewrite it completely doesn’t mean it is working just well enough. We have no choice if we stay with HA.
If anyone is using this, I would like feedback on how it performs with your setup?
For me, logbook loading time has decreased from about 15 seconds to 1 second. Memory usage increases by about 10 MiB (I cache 8 days) and I do not notice any slowdown when the cache fills during restarts.
Hi! I’ve installed this plugin and had it running for about 30 minutes now. I’ve a few metering plugs in my setup and I can say that the loading time of their lovelace cards is significantly faster! Thanks for your work!
Its working great @amelchio! Thank you. Very fast and memory difference is very minimal. I think it is at most 100mb of memory. But, I’m a stay-at-home dad and I treat Home Assistant like my full time job… I have just under 1,000 entitites!
Recent versions of Home Assistant have a much faster logbook so I am not going to update this custom component when it inevitably breaks at some point in the future.