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

Solved n+1 queries problem #1

Merged
merged 2 commits into from
Jul 22, 2022
Merged

Conversation

silviu-constantin
Copy link
Owner

Fixes: AACraiu#1

Changes

Added eager loading method in scores controller in action user_feed avoiding the Lazy loading which was creating a lot of queries to retrieve the user for each score from feed.

Before

Screenshot 2022-07-21 at 09 11 02

After

Screenshot 2022-07-21 at 09 11 26

Check rubocop and rspec

Screenshot 2022-07-21 at 09 41 27

Screenshot 2022-07-21 at 09 42 41

@pasandrei-tol pasandrei-tol merged commit 382230a into main Jul 22, 2022
@pasandrei-tol pasandrei-tol deleted the hotfix/solved_n+1_queries_lazy branch July 22, 2022 07:33
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.

Improve scores feed performance
2 participants