Skip to content

Cache avatar URLs and paths within a request

Stan Hu requested to merge sh-cache-avatar-paths into master

In a merge request with many discussions, the avatar URL can be called thousands of times, inflicting a significant performance penalty especially when avatars are stored in object storage. To mitigate this problem, we can just cache the generated path any time it is requested.

Before:

image

After:

image

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55355

Edited by Stan Hu

Merge request reports