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

Fix performance of home feed regeneration #12084

Merged
merged 1 commit into from
Oct 6, 2019

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Oct 6, 2019

Fetching statuses from all followed accounts at once takes too long within Postgres. Fetching them one by one and merging in Ruby could be a lot less resource-intensive. N+1 queries reduced by preloading a lot of the checks in batches (which helps not only regeneration, but also feed merging).

Because the query for dynamically fetching the home timeline is so heavy, we can no longer offer it when the home timeline is missing. This restores the elephant mascot telling you your home feed is being prepared screen in the web UI.

Related fixes:

  • Centering of the regeneration/missing indicator in web UI
  • Wrong background/centering on introduction screen in web UI

@Gargron Gargron added the performance Runtime performance label Oct 6, 2019
@Gargron Gargron force-pushed the fix-regeneration-worker-performance branch from d2fb1b4 to b924c63 Compare October 6, 2019 18:41
app/lib/feed_manager.rb Show resolved Hide resolved
app/lib/feed_manager.rb Show resolved Hide resolved
@Gargron Gargron force-pushed the fix-regeneration-worker-performance branch from b924c63 to ad0a4cb Compare October 6, 2019 19:22
Fetching statuses from all followed accounts at once takes too long
within Postgres. Fetching them one by one and merging in Ruby
could be a lot less resource-intensive

Because the query for dynamically fetching the home timeline is so
heavy, we can no longer offer it when the home timeline is missing
@Gargron Gargron force-pushed the fix-regeneration-worker-performance branch from ad0a4cb to c4d4d85 Compare October 6, 2019 19:25
@ykzts ykzts self-requested a review October 6, 2019 19:53
@Gargron Gargron merged commit f665901 into master Oct 6, 2019
@Gargron Gargron deleted the fix-regeneration-worker-performance branch October 6, 2019 20:11
@trwnh
Copy link
Member

trwnh commented Oct 7, 2019

Related fixes: Centering of the regeneration/missing indicator in web UI

Does this fix #6786 finally for invalid accounts? #6786 (comment)

EDIT: Apparently it is now mostly fixed but the back button header disappeared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Runtime performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants