Reddit.com appears to be having an outage
820 pointsErrors
>Something went wrong. Just don't panic.
> Sorry, we couldn't load posts for this page. [RETRY]
Comments (659) 103 threads
Show all comments
Showing thread 16 of 103
Now almost all of them are. It's going from O(1) to basically O(n^2) worst case. For millions of users.
I wonder why Reddit is down?
fetching a list of default/subscribed subs and comparing it against the whole list of private subs every time someone loads your homepage sounds like a pretty bad design. why wouldn't something as fundamental as a private/public flag be stored in the main db entry for the subreddit?
either way, this doesn't seem like a probable root cause. checking a list of default subs against the list of private subs would be expensive under any circumstances. having all the default subs added to the private list wouldn't really change the already terrible performance by much. there just aren't that many default subs to begin with.
If that is the case, then generating the home page for a user is going to be hitting a lot of posts from private subs which have to be skipped over until enough accessible posts are reached to fill the page. And in the case of the official app, infinite scrolling is going to lead to constant pressure to generate the list of posts.