-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data viewset retrieval optimisations #1966
Conversation
a27d91a
to
9a439c0
Compare
deleted_at__isnull=True).values_list('id', flat=True) | ||
num_of_submissions = sum( | ||
merged_form.xforms.values_list( | ||
'num_of_submissions', flat=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the above also filter by deleted_at is not null i.e.
merged_form.xforms.filter(deleted_at__isnull=True).values_list('num_of_submissions', flat=True)
If the above is true, can the query in line 417 and 420 be merged into 1 to retrieve both the id
and num_of_submissions
?
# Disable ordering for XForms with Submissions that are more | ||
# than the SUBMISSION_RETRIEVAL_THRESHOLD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or
# Enable ordering for XForms with Submissions that are less
# than the SUBMISSION_RETRIEVAL_THRESHOLD
😄
…tion" classes The two classes are custom classes derived from the Django's Paginator and RestFrameworks' PageNumberPagination that allow the count property on the paginator to be overriden by a passed in value
Disable ETag functionality for forms that have submissions that surpass the "SUBMISSION_RETRIEVAL_THRESHOLD" setting
9116add
to
1412968
Compare
Disable submission ordering when a Form has submissions that surpass a configurable "SUBMISSION_RETRIEVAL_THRESHOLD" limit
… for the data viewset
1412968
to
7bdd4f5
Compare
Changes / Features implemented
SUBMISSION_RETRIEVAL_THRESHOLD
settingSUBMISSION_RETRIEVAL_THRESHOLD
settingSUBMISSION_RETRIEVAL_THRESHOLD
settingCountOverridablePaginator
andCountOverridablePageNumberPagination
CountOverridablePageNumberPagination
TODO
Steps taken to verify this change does what is intended
Side effects of implementing this change