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

Pre v0.0.1.0 Improvements and Changes #4

Merged
merged 3 commits into from
Oct 4, 2021
Merged

Pre v0.0.1.0 Improvements and Changes #4

merged 3 commits into from
Oct 4, 2021

Conversation

neon-nyan
Copy link
Member

@neon-nyan neon-nyan commented Oct 4, 2021

In this commit, HttpClientTool is introduced to replace DownloadTool that is still using old deprecated WebRequest in .NET Framework with new HttpClient in .NET Core
Link:
https://docs.microsoft.com/en-us/dotnet/core/compatibility/networking/6.0/webrequest-deprecated

Downloading the file in high bandwidth is much improved with HttpClient behind v0.0.0.1 that is still using WebRequest

And here's the benchmark result while downloading the Daily Update Files for both Global and SEA version:

Phase v0.0.1.0 v0.0.0.1
1st attempt 1m 30.14s 2m 48.53s
2nd attempt 1m 2.41s 2m 56.84s
3rd attempt 1m 5.05s 2m 53.81s

Also this commit bring some other improvements and changes including:

  • Logger class is now bring together with ILogger Interface. This Interface will be used for cross-method log output.
  • Using HttpClient instead of WebRequest for downloading.
  • Move Stream writing process to its own method (ReadRemoteStream()) on HttpClientTool class for better code writing while implement another downloading methods.
  • Introducing DummyLogger for hiding log output while Console is disabled.
  • Move ProgressBar to it's own section for Daily Update and Block Repair

@neon-nyan neon-nyan merged commit dce68e3 into main Oct 4, 2021
@neon-nyan neon-nyan deleted the pre-v0.0.1.0 branch October 4, 2021 13:00
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.

None yet

1 participant