Changes between and of Initial VersionVersion 1Ticket #9680


Ignore:
Timestamp:
07/30/19 20:32:53 (2 years ago)
Author:
L. Daniel Burr
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9680 – Description

    initial v1  
    1 Situation
     1**Situation**\\
    22In https://github.com/twisted/twisted/blob/trunk/src/twisted/logger/_logger.py#L100 a new instance of the Logger is created each and every time it is accessed as a descriptor.  This can result in a lot of unnecessary object creation.
    33
    4 Target
     4**Target**\\
    55When a Logger instance is created within a class declaration, all subsequent attribute accesses should return the same Logger instance.
    66
    7 Proposal
     7**Proposal**\\
    88As a first step, stop creating a new instance of the Logger, and instead set the namespace, source, and observer attributes on the existing Logger instance.  This will be sufficient for purposes of stemming the object creation tide, but will still be doing pointless work, in that the namespace, source, and observer never change.
    99