• Drew Blessing's avatar
    Prevent Group API N+1 loading group plans · 3182a946
    Drew Blessing authored
    When querying the Groups Project API and including subgroups,
    N+1 queries can take place when loading plans for all the groups
    in the hierarchy. Plans are only applied at the top-level group
    so it is unnecessarily inefficient to load plans for each project
    and associated group in the hierarchy. This change loads the plans
    once and memoizes them for all project groups.
    
    Changelog: fixed
    EE: true
    3182a946
projects_relation_builder.rb 1.44 KB