Reuse chunks from the same download if duplicated #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Drastically decrease memory usage by reusing chunk parts from already downloaded files.
See derrod#17
Usually we do not need even 1Gb of shared memory with this patch.
This is the same approach and roughly the same code as we have for reusing chunks of old game files on update couple lines above.
This is a copy of PR against upstream derrod#683 to speed up delivery of solution for Heroic users
Should help with issues like Heroic-Games-Launcher/HeroicGamesLauncher#2732, Heroic-Games-Launcher/HeroicGamesLauncher#4054, derrod#149,
derrod#151
Personally I was able to download "The Talos Principle 2" with less than 300 Mb of RAM cache usage all the time. Before this patch, about 12Gb was required.
Testing and reviews welcome.