5b8591ec7e
* Avoid circular import in Storage.async_delay_save We call Storage.async_delay_save for every entity being added or removed from the registry. The late import took more time than everything else in the function. * Avoid reschedule churn in Storage.async_delay_save When we are adding or removing entities we will call async_delay_save quite often which has to add and remove a TimerHandle on the event loop which can add up when there are a lot of registry items changing. If the timer handle still has 80% of the time remaining on it we will avoid resceduling and let it fire at the time the original async_delay_save call was made. This ensures we do not force the event loop to rebuild its heapq because too many timer handlers were cancelled at once * div0 * add coverage for 0 since we had none * fix bad conflict * tweaks * tweaks * tweaks * tweaks * tweaks * tweaks * more test fixes * mqtt tests rely on event loop overhead |
||
---|---|---|
.. | ||
__init__.py | ||
test_init.py | ||
test_storage.py |