add cache to github:user data api #10148
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Shouldn't matter basically at all, but noticed it this gets called an annoying amount while trying to nail down a webusb issue with the devtools
pause on caught exceptions
flag on. The api just ends up pointinggithub:user
data at https://github.com/microsoft/pxt/blob/dev/jwunderl/add-cache-github-data/webapp/src/cloudsync.ts#L115, and constantly gives an exception parsing undefined when not signed into github (or just reparses the info, if you are signed in). This happens around half a dozen times on any interaction with the workspace (e.g. dragging a block).As mentioned, can't imagine this specifically impacting performance, but just a tiny thing i saw / maybe worth peeking if there's any 'quick fix' we can make to avoid unnecessary cascading renders. Really the cache here could just be infinite i believe, as we explicitly clear it in
setUser
anyways.