Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optimize/relationship extraction #264

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

Merged
jerel merged 8 commits into django-json-api:develop from jarekwg:optimize/relationship-extraction
Aug 9, 2016
Merged

Optimize/relationship extraction #264

jerel merged 8 commits into django-json-api:develop from jarekwg:optimize/relationship-extraction
Aug 9, 2016

Conversation

Copy link
Contributor

@jarekwg jarekwg commented Aug 4, 2016
edited
Loading

Some options to reduce the number of queries made when using relationships.

Currently the number of db queries made explodes out when either:

  • Including just the primary key as a field in a serializer, without actually "including" it
  • Actually "including" relationships

without prefetching on the viewset's queryset. For complicated models it can be very expensive to defensively prefetch everything every time, so these changes attempt to only fetch them from the db when needed.

  • Added dj110/drf34 tox tests.

Test all pass now, please merge. :)

bor3ham and others added 8 commits August 4, 2016 12:56
@jerel jerel merged commit 04a100c into django-json-api:develop Aug 9, 2016
@jarekwg jarekwg deleted the optimize/relationship-extraction branch October 19, 2018 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /