Dumb-down avatar presence check in `avatar_url` methods
avatar.present?
goes through CarrierWave, and checks that the file
exists on disk and checks its filesize. Because we're hitting the disk,
this adds extra overhead to something where the worst-case scenario is
rendering a broken image.
Instead, we now just check that the database attribute is present, which is good enough for our purposes.
Merge request reports
Activity
cc @stanhu
This should hopefully save some NFS hits. :)
/cc: @pcarranza
Reassigned to @stanhu
mentioned in commit 5323fe41
Awesome @stanhu
mentioned in merge request gitlab-com/www-gitlab-com!2497 (merged)
Mentioned in commit stanhu/gitlab-ce@5323fe41
Please register or sign in to reply