legrego / homeassistant-elasticsearch

Publish Home-Assistant events to Elasticsearch
https://legrego.github.io/homeassistant-elasticsearch/
MIT License
143 stars 38 forks source link

Performance profiling #278

Open strawgate opened 3 weeks ago

strawgate commented 3 weeks ago

I'd like to do a one-off performance profiling test (or maybe a pytest) with a high number of entities to test memory/CPU usage and make sure there's nothing we're doing anywhere that is particularly bad.

strawgate commented 3 weeks ago

It looks like there is a profiling integration so this might be easier than I thought

strawgate commented 2 weeks ago

Top hot functions based on 0.7.0 image

Seems like there might be an opportunity to optimize sanitizing attributes and sanitizing datastream names.

The simplest solution is probably to just cache the sanitized names

strawgate commented 2 weeks ago

Cache datastream and attribute normalization: Issue: https://github.com/legrego/homeassistant-elasticsearch/issues/293 PR: https://github.com/legrego/homeassistant-elasticsearch/pull/294

strawgate commented 2 weeks ago

Reduce attribute counts:

Issue: https://github.com/legrego/homeassistant-elasticsearch/issues/297

PR: https://github.com/legrego/homeassistant-elasticsearch/pull/298

strawgate commented 1 day ago

Issue: https://github.com/legrego/homeassistant-elasticsearch/issues/310

PR: https://github.com/legrego/homeassistant-elasticsearch/pull/311