Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#32518 closed Cleanup/optimization (fixed)

Document that QuerySet.contains() should not be overused.

Reported by: Mariusz Felisiak Owned by: John Hollingsworth
Component: Documentation Version: 4.0
Severity: Normal Keywords:
Cc: Johan Schiff Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Adjust Don’t overuse count() and exists() section in docs to mention QuerySet.contains(), see comment.

Follow up to #24141.

Change History (11)

comment:1 by Carlton Gibson, 4 years ago

Triage Stage: UnreviewedAccepted

comment:2 by AdamDonna, 4 years ago

I've had a go at addressing this change. I suspect this will need some refinement. The PR is at https://github.com/django/django/pull/14161

comment:3 by Mariusz Felisiak, 4 years ago

Has patch: set
Owner: changed from nobody to AdamDonna
Patch needs improvement: set
Status: newassigned

comment:4 by Pradhvan Bisht , 3 years ago

SInce the PR https://github.com/django/django/pull/14161 is closed, I think Adam is not working on it.

I would be happy to take this up since tim-mccurrach has left quite a detailed note on the PR and it would be easy for me to pick up the recommendation and add it in a separate PR.

comment:5 by Pradhvan Bisht , 3 years ago

Owner: changed from AdamDonna to Pradhvan Bisht

comment:6 by Mariusz Felisiak, 3 years ago

Owner: Pradhvan Bisht removed
Status: assignednew

comment:7 by John Hollingsworth, 3 years ago

Owner: set to John Hollingsworth
Status: newassigned

I'll pick up this ticket where the previous PR left off

comment:8 by John Hollingsworth, 3 years ago

Patch needs improvement: unset

comment:9 by Mariusz Felisiak, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In d70b4be:

Fixed #32518 -- Doc'd that QuerySet.contains() should not be overused.

Thanks Tim McCurrach for the idea.

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 8c407ee7:

[4.0.x] Fixed #32518 -- Doc'd that QuerySet.contains() should not be overused.

Thanks Tim McCurrach for the idea.

Backport of d70b4bea18c96e518ce14dca96085e9265e8ebb6 from main

Note: See TracTickets for help on using tickets.
Back to Top