Changes between Initial Version and Version 2 of Ticket #36987


Ignore:
Timestamp:
Mar 16, 2026, 8:34:58 AM (3 hours ago)
Author:
Jacob Walls
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36987 – Description

    initial v2  
    33`UUIDField` doesn't follow this pattern, causing two extra calls to `isinstance(val, UUID)` per value, which can add up for a large bag of values, e.g. a `prefetch_related()` call.
    44
    5 Here is a [https://dryorm.xterm.info/uuidfield-get-db-prep-value fiddle] on DryORM with my fix branch checked out. Re-run the fiddle against main and notice 4 fewer calls to isinstance (2 * n objects).
     5Here is a [https://dryorm.xterm.info/uuidfield-get-db-prep-value fiddle] on DryORM with my fix branch checked out. Re-run the fiddle against main and notice 4 more calls to isinstance (2 * n objects).
    66
    77Discovered while reviewing the profile in a [https://github.com/django/django/pull/20779/changes micro-optimization PR]
Back to Top