From 0101528821caaa7a0378317ff5d786cfc4abe168 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 17 May 2016 13:22:19 -0400 Subject: [PATCH] PERF: update_user_counts is too slow during imports --- lib/post_creator.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/post_creator.rb b/lib/post_creator.rb index e0aab276a..005932a8e 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -376,6 +376,8 @@ class PostCreator end def update_user_counts + return if @opts[:import_mode] + @user.create_user_stat if @user.user_stat.nil? if @user.user_stat.first_post_created_at.nil?