import logging.config costs ~29 ms and import logging.handlers ~26 ms, but most of what they
import is only needed conditionally based on feature usage (socket/HTTP/SMTP
handlers, the config socket listener, multiprocessing queue detection).
Apply lazy imports to the modules within the logging package while preserving finalization and shutdown expectations.
Activity
brittanyrey commented on Sep 1, 2026
@hugovk can this issue be a sub-issue of #154675
(I don't think I have the permissioning to do so)
hugovk commented on Sep 1, 2026
Done! Any future import improvements can use that issue directly.