Avoid expensive inspect calls in config validators (#112085)
* Avoid expensive inspect calls in config validators inspect has a performance problem https://github.com/python/cpython/issues/92041 We now avoid calling inspect unless we are going to log * remove unused * reduce * get_integration_logger
This commit is contained in:
parent
9353ad0690
commit
6421a08ba8
5 changed files with 101 additions and 59 deletions
|
@ -1,8 +1,15 @@
|
|||
"""An integration which calls helpers.frame.get_integration_frame."""
|
||||
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers import frame
|
||||
|
||||
|
||||
def call_get_integration_logger(fallback_name: str) -> logging.Logger:
|
||||
"""Call get_integration_logger."""
|
||||
return frame.get_integration_logger(fallback_name)
|
||||
|
||||
|
||||
def call_get_integration_frame() -> frame.IntegrationFrame:
|
||||
"""Call get_integration_frame."""
|
||||
return frame.get_integration_frame()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue