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

remove n+1 queries in rss builder #8306

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

Tlazypanda
Copy link
Collaborator

@Tlazypanda Tlazypanda commented Aug 15, 2020

Fixes #8308

Eliminate n+1 queries for rss by using .includes to preload user and user_tags models.

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

Thanks!

@gitpod-io
Copy link

gitpod-io bot commented Aug 15, 2020

@codecov
Copy link

codecov bot commented Aug 15, 2020

Codecov Report

Merging #8306 into main will decrease coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8306      +/-   ##
==========================================
- Coverage   81.39%   81.27%   -0.12%     
==========================================
  Files         101      101              
  Lines        5859     5859              
==========================================
- Hits         4769     4762       -7     
- Misses       1090     1097       +7     
Impacted Files Coverage Δ
app/models/tag.rb 97.47% <100.00%> (ø)
app/services/execute_search.rb 88.88% <0.00%> (-5.56%) ⬇️
app/api/srch/search.rb 66.24% <0.00%> (-3.83%) ⬇️

@Tlazypanda Tlazypanda force-pushed the remove_n+1_notes#rss branch 2 times, most recently from 98355f1 to efd1e8d Compare August 15, 2020 20:04
@Tlazypanda Tlazypanda requested a review from a team as a code owner August 15, 2020 20:38
@Tlazypanda Tlazypanda closed this Aug 15, 2020
@Tlazypanda Tlazypanda reopened this Aug 15, 2020
@gitpod-io
Copy link

gitpod-io bot commented Aug 15, 2020

@jywarren jywarren merged commit 13143e8 into publiclab:main Aug 18, 2020
nadimakhtar97 pushed a commit to nadimakhtar97/plots2 that referenced this pull request Sep 21, 2020
shubhangikori pushed a commit to shubhangikori/plots2 that referenced this pull request Oct 12, 2020
alvesitalo pushed a commit to alvesitalo/plots2 that referenced this pull request Oct 14, 2020
piyushswain pushed a commit to piyushswain/plots2 that referenced this pull request Oct 22, 2020
@jywarren
Copy link
Member

Hi! I noticed this caused very long load times in #8902 due to joining the users table, which is huge. So I'm going to revert to see if we get better performance - thank you!!! #8903

jywarren added a commit that referenced this pull request Dec 29, 2020
…8903)

* remove user join to revert #8306 and reduce load time for RSS feeds

fixes #8902

* change users/rss.rss.builder too

* change notes/rss.rss.builder too
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
…S feeds (publiclab#8903)

* remove user join to revert publiclab#8306 and reduce load time for RSS feeds

fixes publiclab#8902

* change users/rss.rss.builder too

* change notes/rss.rss.builder too
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
…S feeds (publiclab#8903)

* remove user join to revert publiclab#8306 and reduce load time for RSS feeds

fixes publiclab#8902

* change users/rss.rss.builder too

* change notes/rss.rss.builder too
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
…S feeds (publiclab#8903)

* remove user join to revert publiclab#8306 and reduce load time for RSS feeds

fixes publiclab#8902

* change users/rss.rss.builder too

* change notes/rss.rss.builder too
ampwang pushed a commit to ampwang/plots2 that referenced this pull request Oct 26, 2021
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
…S feeds (publiclab#8903)

* remove user join to revert publiclab#8306 and reduce load time for RSS feeds

fixes publiclab#8902

* change users/rss.rss.builder too

* change notes/rss.rss.builder too
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.

Remove n+1 queries for rss
2 participants