Skip to content
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

Perf/fix project and unit load times #362

Merged

Conversation

macite
Copy link
Member

@macite macite commented Mar 10, 2022

Description

This PR reinstates the task_stats data for the front end and improves the load time performance of units. This is done by caching the task_stats in the project and updating this on task status change and change of target grade. As a result, this can be loaded from the database on the students query.

macite and others added 3 commits March 10, 2022 14:18
Reinstate use of the task_stats field to cache task status counts on
update of target grade and tasks status. This improves performance
of student query when loading a unit for staff.

Co-authored-by: Tan Le <tan.le@hey.com>
Co-authored-by: Ray Guo <RayGuo-ergou@users.noreply.github.com>
Co-authored-by: talzid <talzid@users.noreply.github.com>
app/models/project.rb Outdated Show resolved Hide resolved
app/models/project.rb Outdated Show resolved Hide resolved
app/models/project.rb Outdated Show resolved Hide resolved
app/models/project.rb Outdated Show resolved Hide resolved
db/migrate/20220310092851_update_task_stats.rb Outdated Show resolved Hide resolved
app/models/unit.rb Outdated Show resolved Hide resolved
app/models/task_status.rb Show resolved Hide resolved
app/models/project.rb Outdated Show resolved Hide resolved
app/models/project.rb Outdated Show resolved Hide resolved
@tancnle
Copy link
Contributor

tancnle commented Mar 10, 2022

Thank you for your hard work on this fix @macite ❤️ I have left some suggestions/questions. Please let me know what you think 🙏🏼

@macite
Copy link
Member Author

macite commented Mar 10, 2022

Thanks for the great review @tancnle 👍 - I will address the issues raised and update ASAP.

@jakerenzella
Copy link
Member

I agree, this is a great review @tancnle thank you!

@macite macite merged commit 5e56eca into doubtfire-lms:development Mar 17, 2022
@macite macite deleted the perf/fix-project-and-unit-load-times branch March 17, 2022 10:44
@tancnle
Copy link
Contributor

tancnle commented Mar 17, 2022

Thank you @macite 🚀

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.

3 participants