From 3737592c13b9514ca3ec4bfc6298648078d60763 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Mon, 31 Oct 2011 14:09:20 -0700 Subject: [PATCH] Don't recalculate parents dict for zero-comment links. --- r2/r2/lib/comment_tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/comment_tree.py b/r2/r2/lib/comment_tree.py index b458abaa6..8c0b7ceaf 100644 --- a/r2/r2/lib/comment_tree.py +++ b/r2/r2/lib/comment_tree.py @@ -258,7 +258,7 @@ def link_comments_and_sort(link_id, sort): % link_id) parents = {} - if not parents: + if not parents and len(cids) > 0: with g.make_lock(lock_key(link_id)): # reload from the cache so the sorter and parents are # maximally consistent