Changes between Initial Version and Version 2 of Ticket #36987
- Timestamp:
- Mar 16, 2026, 8:34:58 AM (3 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36987 – Description
initial v2 3 3 `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. 4 4 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 fewercalls to isinstance (2 * n objects).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 more calls to isinstance (2 * n objects). 6 6 7 7 Discovered while reviewing the profile in a [https://github.com/django/django/pull/20779/changes micro-optimization PR]