Changes between Initial Version and Version 1 of Ticket #35236
- Timestamp:
- Feb 19, 2024, 5:01:55 PM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35236
- Property Has patch set
- Property Owner changed from to
-
Ticket #35236 – Description
initial v1 1 1 Many 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. 2 2 3 From a profile of system checks on a smaller project, there were ~ 1k calls for variousversions of each method:3 From a profile of system checks on a smaller project, there were ~2k calls between the versions of each method: 4 4 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()` 11 9 12 10 All of these are eliminated by moving to attribute access.