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

Removing n+1 queries in discipline dashboard #2375

Merged
merged 3 commits into from Jan 29, 2019

Conversation

Projects
None yet
2 participants
@edavidsonsawyer
Copy link
Collaborator

edavidsonsawyer commented Jan 28, 2019

Who is this PR for?

educators

What problem does this PR fix?

Discipline data loads slowly as a result of some inefficient queries

What does this PR do?

improves the queries for discipline dashboard data to speed up load time

Checklists

Which features or pages does this PR touch?

  • Discipline

Does this PR use tests to help verify we can deploy these changes quickly and confidently?

  • Manual testing made more sense here
@edavidsonsawyer

This comment has been minimized.

Copy link
Collaborator Author

edavidsonsawyer commented Jan 28, 2019

@kevinrobinson frankly I thought this had been done way back when the discipline stuff first went out. Oversight on my part. Locally this improved load times quite a bit, but it would be good to see how big a difference it makes in production.

@edavidsonsawyer

This comment has been minimized.

Copy link
Collaborator Author

edavidsonsawyer commented Jan 28, 2019

@kevinrobinson hold off on this. There seems to be a bug with how this handles event notes. It's actually affecting the absence dashboard as well right now (which makes sense)

@edavidsonsawyer

This comment has been minimized.

Copy link
Collaborator Author

edavidsonsawyer commented Jan 28, 2019

@kevinrobinson Nevermind all that. It turns out I just didn't have any event_notes for my users that were less than a year old. This is all working as expected!

@edavidsonsawyer

This comment has been minimized.

Copy link
Collaborator Author

edavidsonsawyer commented Jan 28, 2019

@kevinrobinson okay, now this should be all set to go when you're ready.

@kevinrobinson

This comment has been minimized.

Copy link
Contributor

kevinrobinson commented Jan 29, 2019

@edavidsonsawyer awesome! 👍 Tested this and it looks great, 🚢 ing to confirm now.

@kevinrobinson kevinrobinson merged commit fe9b8ec into studentinsights:master Jan 29, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment