Changes between Initial Version and Version 1 of Ticket #35246


Ignore:
Timestamp:
Feb 23, 2024, 6:06:16 AM (9 months ago)
Author:
Adam Johnson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35246

    • Property Has patch set
  • Ticket #35246 – Description

    initial v1  
    1111The result is immutable because the two input attributes shouldn’t change.
    1212
    13 I found this method was called 3543 times during system checks, taking ~0.7% (~0.3ms) of the total runtime on a Python 3.12 project with 118 models. After moving it to a plain attribute, this cost is eliminated. (cProfile’s overhead biases the cost of function calls upwards, so the actual saving may be smaller, but probably not too much smaller.)
     13I found this method was called 3543 times during system checks, taking ~0.7% (~0.3ms) of the total runtime on a Python 3.12 project with 118 models. After moving it to a plain attribute, this cost is eliminated. (cProfile’s overhead biases the cost of function calls upwards, so the actual saving may be smaller, but it still seems worth the minimal change.)
    1414
    1515`unique` is accessed in many other code paths so this change will help those paths too.
Back to Top