New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatars being repeatedly downloaded. #1547

Closed
grokys opened this Issue Mar 20, 2018 · 7 comments

Comments

Projects
3 participants
@grokys
Contributor

grokys commented Mar 20, 2018

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.

@grokys grokys added the bug label Mar 20, 2018

@grokys

This comment has been minimized.

Contributor

grokys commented Mar 20, 2018

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: desktop/desktop#821 (comment)

@darn

This comment has been minimized.

darn commented Mar 20, 2018

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.

@darn

This comment has been minimized.

darn commented Mar 21, 2018

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

@jcansdale jcansdale self-assigned this Apr 3, 2018

@jcansdale jcansdale referenced this issue Apr 3, 2018

Merged

Limit avatar download attempts #1579

1 of 1 task complete
@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Apr 3, 2018

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!

@darn

This comment has been minimized.

darn commented Apr 4, 2018

@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 👍

@darn

This comment has been minimized.

darn commented Apr 4, 2018

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

@meaghanlewis meaghanlewis added this to Low Priority in BUGS Apr 4, 2018

@meaghanlewis meaghanlewis moved this from Low Priority to In Progress in BUGS Apr 4, 2018

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Apr 5, 2018

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.

@grokys grokys closed this in #1579 Apr 11, 2018

BUGS automation moved this from In Progress to Done Apr 11, 2018

@meaghanlewis meaghanlewis added this to To do in 2.4.4 via automation Apr 13, 2018

@meaghanlewis meaghanlewis removed this from Done in BUGS Apr 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment