Skip to content

Removing n+1 queries in discipline dashboard#2375

Merged
kevinrobinson merged 3 commits into
studentinsights:masterfrom
edavidsonsawyer:improve_dashboard_load
Jan 29, 2019
Merged

Removing n+1 queries in discipline dashboard#2375
kevinrobinson merged 3 commits into
studentinsights:masterfrom
edavidsonsawyer:improve_dashboard_load

Conversation

@edavidsonsawyer

@edavidsonsawyer edavidsonsawyer commented Jan 28, 2019

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator Author

@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

Copy link
Copy Markdown
Collaborator Author

@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

Copy link
Copy Markdown
Collaborator Author

@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

Copy link
Copy Markdown
Collaborator Author

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

@kevinrobinson

Copy link
Copy Markdown
Contributor

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

@kevinrobinson kevinrobinson merged commit fe9b8ec into studentinsights:master Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants