PERF: shift most user options out of the user table

As it stands we load up user records quite frequently on the topic pages,
this in turn pulls all the columns for the users being selected, just to
discard them after they are loaded

New structure keeps all options in a discrete table, this is better organised
and allows us to easily add more column without worrying about bloating the
user table
This commit is contained in:
Sam
2016-02-17 15:46:19 +11:00
parent 63cda22623
commit 3829c78526
28 changed files with 363 additions and 191 deletions

View File

@@ -157,7 +157,7 @@ module PostGuardian
return false unless post
if !post.hidden
return true if post.wiki || SiteSetting.edit_history_visible_to_public || post.user.try(:edit_history_public)
return true if post.wiki || SiteSetting.edit_history_visible_to_public || (post.user && post.user.user_option.edit_history_public)
end
authenticated? &&