Skip to content
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

add cache to github:user data api #10148

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Conversation

jwunderl
Copy link
Member

@jwunderl jwunderl commented Sep 3, 2024

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 pointing github: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.

@jwunderl jwunderl requested a review from a team September 3, 2024 21:18
@jwunderl jwunderl merged commit 384994a into master Sep 3, 2024
6 checks passed
@jwunderl jwunderl deleted the dev/jwunderl/add-cache-github-data branch September 3, 2024 21:30
abchatra pushed a commit that referenced this pull request Sep 4, 2024
* add cache to github:user data api

* fix indentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants