summaryrefslogtreecommitdiff
path: root/django/contrib/contenttypes
diff options
context:
space:
mode:
authorKeryn Knight <keryn@kerynknight.com>2021-07-20 13:04:51 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2026-03-11 18:05:44 +0100
commit8d8a8713432a88737c4400610eef11c5c8457b86 (patch)
tree5df6a43a6e620a1ad1eba5c935ed8d7c097fe002 /django/contrib/contenttypes
parent3483bfc0920b0ef0b28563aabe8ff546699b6ece (diff)
Refs #28455 -- Implemented private API methods for preventing QuerySet cloning.
Multiple calls are idempotent assuming they're balanced. Also, multiple calls to disable cloning followed by a single call to re-enable cloning will subsequently cause clones to occur - it is not a stack, just a toggle. @contextlib.contextmanager is intentionally not used for performance reasons: - decorator takes 1.1µs to execute, or 2µs if used correctly in a `with ...:` statement - custom class takes 300ns to execute, or 900ns if used correctly in a `with ...:` statement Based on work originally done by Anssi Kääriäinen and Tim Graham.
Diffstat (limited to 'django/contrib/contenttypes')
0 files changed, 0 insertions, 0 deletions