context_logging
context_logging copied to clipboard
Speed up ContextLogRecord
Summary
Make ContextLogRecord faster.
Details
The context attribute for ContextLogRecord is a dict built directly from _context_data dicts instead of UserDict/ChainMap proxy. According to measurements this variant collects data ~20 times faster than previous approach.
Additional fixes:
- faster
_parent_contextemptiness check - typo in FILL_EXCEPTIONS_DEFAULT
Also pls consider using empty dict instead of empty str for the case of empty current_context
Check list
- [+] Tests
- [+] README.md changed if needed