mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Temporarily break imgur.com domain listings for the greater good.
Turns out, this is the entire cause of current permacache lock contention causing vote processing slowdowns.
This commit is contained in:
@@ -916,9 +916,11 @@ def new_vote(vote, foreground=False, timer=None):
|
||||
get_links(sr, 'controversial', 'all'),
|
||||
])
|
||||
|
||||
for domain in utils.UrlParser(item.url).domain_permutations():
|
||||
for sort in ("hot", "top", "controversial"):
|
||||
results.append(get_domain_links(domain, sort, "all"))
|
||||
parsed = utils.UrlParser(item.url)
|
||||
if parsed.hostname and not parsed.hostname.endswith('imgur.com'):
|
||||
for domain in parsed.domain_permutations():
|
||||
for sort in ("hot", "top", "controversial"):
|
||||
results.append(get_domain_links(domain, sort, "all"))
|
||||
|
||||
add_queries(results, insert_items = item, foreground=foreground)
|
||||
|
||||
|
||||
@@ -178,6 +178,12 @@ class Reddit(Templated):
|
||||
elif c.firsttime and c.site.firsttext:
|
||||
infotext = c.site.firsttext
|
||||
|
||||
if isinstance(c.site, DomainSR) and c.site.domain.endswith("imgur.com"):
|
||||
self.infobar = InfoBar(
|
||||
message=_("imgur.com domain listings (including this one) are "
|
||||
"currently disabled to speed up vote processing.")
|
||||
)
|
||||
|
||||
if infotext:
|
||||
self.infobar = InfoBar(message = infotext)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user