Changes between Initial Version and Version 1 of Ticket #35236


Ignore:
Timestamp:
Feb 19, 2024, 5:01:55 PM (7 months ago)
Author:
Adam Johnson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35236

    • Property Has patch set
    • Property Owner changed from nobody to Adam Johnson
  • Ticket #35236 – Description

    initial v1  
    11Many field references call `Field.get_attname_column()` or `Field.get_attname()`, despite the `attname` and `column` attributes containing the computed results (after `contribute_to_class()`). Updating those call sites to plain attribute access eliminates some function calls, a worthy small speedup.
    22
    3 From a profile of system checks on a smaller project, there were ~1k calls for various versions of each method:
     3From a profile of system checks on a smaller project, there were ~2k calls between the versions of each method:
    44
    5 {{{
    6 630    0.000    0.000    0.000    0.000 __init__.py:976(get_attname_column)
    7 208    0.000    0.000    0.000    0.000 related.py:1122(get_attname_column)
    8 431    0.000    0.000    0.000    0.000 related.py:1119(get_attname)
    9 666    0.000    0.000    0.000    0.000 __init__.py:973(get_attname)
    10 }}}
     5* 630 for `Field.get_attname_column()`
     6* 208 for `ForeignKey.get_attname_column()`
     7* 666 for `Field.get_attname()`
     8* 431 for `ForeignKey.get_attname()`
    119
    1210All of these are eliminated by moving to attribute access.
Back to Top