Yes I think it does slow it down.

The method suggested would not necessarily slow this down (we're
specifically interested in sql queries for this patch) so yea we could do
that.


On Mon, Aug 19, 2013 at 12:24 PM, john irving <notifications@github.com>wrote:

> In app/helpers/discussions_helper.rb:
>
> > @@ -15,7 +15,7 @@ def enabled_icon_class_for(discussion, user)
> >
> >    def css_class_unread_discussion_activity_for(page_group, discussion, user)
> >      css_class = "discussion-preview"
> > -    css_class += " showing-group" if (not discussion.group.parent.nil?) && (page_group && (page_group.parent.nil?))
> > +    css_class += " showing-group" if (not discussion.group.parent_id.nil?) && (page_group && (page_group.parent_id.nil?))
>
> does looking up parent_id makes this faster? seems like less high-level
> would making this a method like discussion.is_in_a_subgroup? slow this
> down, it would certainly make it more readable
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/loomio/loomio/pull/980/files#r5833101>
> .
>