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

Faster resumable downloads #2676

Merged

Conversation

AlexDickerson
Copy link
Contributor

@AlexDickerson AlexDickerson commented Dec 29, 2024

Replaces the existing ResumableDownloader with a new implementation that uses native HttpClient rather than the Downloader library.

Reworked how downloads are resumed. If a download is found but does not hash as expected, indicating it was not completed, the length of the file is taken as the starting position for a new download.

Progress reporting working as normal. Adjusted to only report progress on files over a certain size in order to eliminate needless work for the UI.

Added a threshold to the log stream shown in the installation UI. Now only logs of Error or above will be displayed. This significantly improves the responsiveness of the UI.

Removed performance settings that are no longer in use.

Impact

  • Much faster sustained download speeds, easily capable of saturating a 1gb/s connection.
  • Much lower memory usage during downloads
  • Much more responsive UI. UI freezes should be totally eliminated

This replaces this PR: #2676 (comment)

Revert changes to GoogleDriveDownloader
Revert changes to GoogleDriveDownloader
…veness.

Added dedicated DI extension for ResumableDownloader
Added slight delay to download creation to help avoid hitting API limits/DDOS protections
Added progress reporting to downloader
Added preallocation of file sizes to downloader
Fixed error when hashing file due to stream not supporting read
Copy link
Member

@tr4wzified tr4wzified left a comment

Choose a reason for hiding this comment

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

Awesome stuff, just a few remarks. Been a while since we had another contributor showing up :)

Wabbajack.App.Wpf/Models/LogStream.cs Outdated Show resolved Hide resolved
Wabbajack.App.Wpf/Wabbajack.App.Wpf.csproj Outdated Show resolved Hide resolved
Wabbajack.Installer/AInstaller.cs Outdated Show resolved Hide resolved
Wabbajack.Networking.Http/ResumableDownloader.cs Outdated Show resolved Hide resolved
Wabbajack.Networking.Http/ResumableDownloader.cs Outdated Show resolved Hide resolved
1. Reverted log stream threshold
2. Removed batching from missing archives download
3. Adjusted threshold for progress reporting in resumable downloader to 10mb
4. Added additional logging to ResumableDownloader
5. Typo
@AlexDickerson AlexDickerson marked this pull request as ready for review December 29, 2024 12:41
@tr4wzified tr4wzified merged commit 4b1e242 into wabbajack-tools:main Jan 8, 2025
3 checks passed
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.

2 participants