Changes between Initial Version and Version 1 of Ticket #35232


Ignore:
Timestamp:
Feb 18, 2024, 3:51:26 PM (9 months ago)
Author:
Adam Johnson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35232 – Description

    initial v1  
    33The `Model._meta.verbose_name_raw` property returns the stringified version of the `verbose_name` attribute whilst temporarily disabling translations. It is only used in `django.contrib.auth` for creating permission names.
    44
    5 Profiling the system checks on a project with 118 models revealed this property was taking ~15% of the total runtime, taking 10ms across 420 calls. Turning it into a `cached_property` and adding a no-translation fast path saves nearly all this cost, making it take <1ms across 105 calls.
     5I found this property was taking ~15 of the total runtime for system checks on a project with 118 models. calls. Turning it into a `cached_property` and adding a no-translation fast path saves nearly all this cost, with the below results.
     6
     7Before: 520 calls taking 10ms
     8After: 105 calls taking ~0ms
Back to Top