Enji Cooper <yaneurab...@gmail.com> added the comment:

Capturing more context here, based on internal discussion: other handlers are 
doing address resolution in `emit()` (HTTPHandler, SMTPHandler), which is 
expensive. In order for SysLogHandler to not regress behavior and not become 
expensive, performance-wise, it would probably be best to use 
`functools.lru_cache()`, using the address and a timeout as the key when 
resolving the addresses to avoid always doing address resolutions, e.g., DNS 
lookups: https://docs.python.org/3/library/functools.html#functools.lru_cache .

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38354>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to