• Andy Soiron's avatar
    Avoid N+1 queries in JiraConnect::client · 0c2b766c
    Andy Soiron authored
    We expose a user notes count for each MR. Counting
    user notes executes an extra SQL query for each MR in the list.
    This commit loads all counts in one query and passes it to the
    serializer as an option. If the option is not available, it will
    fall back to execute a count query.
    0c2b766c
client_spec.rb 1.71 KB