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

Optimize gpu-data.json and os-data.json fetching #195

Closed
wangcheng opened this issue Sep 23, 2023 · 4 comments
Closed

Optimize gpu-data.json and os-data.json fetching #195

wangcheng opened this issue Sep 23, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@wangcheng
Copy link

wangcheng commented Sep 23, 2023

Currently TNUC will fetch the latest gpu-data.json and os-data.json every time, which is not ideal for the following reasons:

  • User's GPU and OS are not changing frequently. We are wasting network resources and time to fetch them every time.
  • Users in China have difficulty accessing GitHub's "raw" resources due to the GFW. Some users have proxy tools to work around the GFW but they are usually browser-based because it is tricky to enable proxy for CLI tools like TNUC.

My proposed solution:

  • Currently TNUC can read local json files from working directory (usually users home dir). I think the better solution is to read them from the app config directory (AppData\Local\Hawaii_Beach\TinyNvidiaUpdateChecker). This will allow the user that can't access GitHub to fetch a local copy from the browser and save them in the app's own dir instead of home dir.
  • To save network requests and time, we can fetch and store these 2 files locally and only fetch the latest version if we can't find the current GPU or OS in the local file.
@ElPumpo
Copy link
Owner

ElPumpo commented Sep 24, 2023

Hi Wang. Thanks for enlightning me about this, I agree it should be cached in the configuration directory.

You could also compare the date of the cached files so if they are a week old then update them.

Great idea! I will implement this for the next release.

@ElPumpo ElPumpo self-assigned this Sep 24, 2023
@ElPumpo ElPumpo added the enhancement New feature or request label Sep 24, 2023
@wangcheng
Copy link
Author

Thanks for the reply!

Please consider implementing reading files from AppData folder. I will appreciated it as a user in China and I don't like the idea of put some json files in my home directory. Thanks!

@ElPumpo
Copy link
Owner

ElPumpo commented Jun 6, 2024

Hi sorry for the extreme delay, this feature has now been developed and will be released in the v1.18.0 update. Thank you for your feedback, indeed the implementation was very bad.

ElPumpo added a commit that referenced this issue Jun 6, 2024
@ElPumpo ElPumpo closed this as completed Jun 6, 2024
@wangcheng
Copy link
Author

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants