Visualstudio: Avatars being repeatedly downloaded.

Created on 20 Mar 2018  路  7Comments  路  Source: github/VisualStudio

From halp:

I manage a github enterprise instance. A lot of the people I support internally use the https://visualstudio.github.com/ open source project that seems to be maintained by GitHub staff https://github.com/github/VisualStudio/commits/master. The problem I am experiencing is that the VisualStudio GitHub extension makes 10's of thousands of API calls to download account avatars when accessing a repo. This spikes CPU usage to 100% over the 10+ minutes it is downloading the avatars. For example below is the accumulated API calls to download avatars made from a single developers system while accessing a few repos over a 1 hour period:

$ grep -F 'now="2018-03-19T08' unicorn.log > unicorn_8AM.log
$ grep -F '10.13.102.88' unicorn_8AM.log | grep Favatars | grep -o now=[^\ ]* | cut -c 17-20 | uniq -c | > uniq -c | sort -rn | head -10

1 29643 08:0
1 28866 08:3
1 18158 08:2
1 16378 08:4
1 918 08:1

This behavior is consistent for everyone that uses this extension.

bug

Most helpful comment

I suspect this is a similar issue that desktop were seeing, in that avatars fail to authenticate with a token, and so we're repeatedly trying to download them, willing it to not fail: https://github.com/desktop/desktop/issues/821#issuecomment-296272496

All 7 comments

I suspect this is a similar issue that desktop were seeing, in that avatars fail to authenticate with a token, and so we're repeatedly trying to download them, willing it to not fail: https://github.com/desktop/desktop/issues/821#issuecomment-296272496

It should be noted that the github enterprise instance in the OP is running the latest public version 2.12.7, and that Private mode is enabled.

I am wondering why avatar downloads are a requirement? Could there be a setting that allows the client to ignore avatars?

Hi @darn,

Could you try the GitHub.VisualStudio.vsix at the following location and let me know if it resolves the issue?
https://ci.appveyor.com/project/github-windows/visualstudio/build/2.4.4.2016/artifacts

The avatar should revert to a default image rather than bombard your server with requests. There might be a few requests but not the number you're currently seeing!

@jcansdale I have tested it locally, and it seems to now have a single spike event instead of a long lasting process. I have asked a few others to test it before I give a final :+1:

Confirmed improvement. The following graphic shows (1) instance of opening a repo prior to installing the Fix and (2) instances of opening the same repo after installing the Fix.
image

Thanks @darn for the initial report and confirming this fix! I look forward to getting it into the next release.

BTW, there's no harm in installing the .vsix I linked. When the next official release comes out, it should auto-update.

Was this page helpful?
0 / 5 - 0 ratings