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

Only fetch the most recent update from the GitHub releases #2169

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

absidue
Copy link
Member

@absidue absidue commented Apr 7, 2022


Only fetch the most recent update from the GitHub releases

Important note
We may remove your pull request if you do not use this provided PR template correctly.

Pull Request Type
Please select what type of pull request this is:

  • Bugfix
  • Feature Implementation

Related issue
n/a

Description

Instead of fetching a full page (default 30) releases from the GitHub API when checking for updates, only fetch the first item, this reduces the response from ~50kB to ~4.4kB. This should make checking for updates significantly faster.

Screenshots (if appropriate)
n/a

Testing (for code that is not small enough to be easily understandable)
Has this pull request been tested? Yes
Please describe shortly how you tested it and whether there are any ramifications remaining. No additional errors were logged in the devtools console during the update check, additionally the request was successful in the network tab of the devtools

Desktop (please complete the following information):

  • OS: Windows
  • OS Version: 10
  • FreeTube version: commit 5c54862

Additional context

GitHub releases API docs

@PrestonN PrestonN enabled auto-merge (squash) April 7, 2022 17:00
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 7, 2022
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@PrestonN PrestonN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@PrestonN PrestonN merged commit 048b7bc into FreeTubeApp:development Apr 8, 2022
@absidue absidue deleted the smaller-release-json branch April 8, 2022 11:43
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 10, 2022
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.

4 participants