Commit ff337ee3 authored by Matthias Käppler's avatar Matthias Käppler

Merge branch '211373-improve-issues-list-api-memory' into 'master'

Improve memory consumption of issuable APIs

See merge request gitlab-org/gitlab!61561
parents 412b5fe2 b29de78e
---
title: Improve memory consumption of issuable APIs
merge_request: 61561
author:
type: performance
......@@ -24,7 +24,7 @@ module API
# entity according to the current top-level entity options, such
# as the current_user.
def lazy_issuable_metadata
BatchLoader.for(object).batch(key: [current_user, :issuable_metadata]) do |models, loader, args|
BatchLoader.for(object).batch(key: [current_user, :issuable_metadata], replace_methods: false) do |models, loader, args|
current_user = args[:key].first
issuable_metadata = Gitlab::IssuableMetadata.new(current_user, models)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment