Changes between Initial Version and Version 1 of Ticket #35246
- Timestamp:
- Feb 23, 2024, 6:06:16 AM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35246
- Property Has patch set
-
Ticket #35246 – Description
initial v1 11 11 The result is immutable because the two input attributes shouldn’t change. 12 12 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.)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 it still seems worth the minimal change.) 14 14 15 15 `unique` is accessed in many other code paths so this change will help those paths too.