Rewrite data package caching#38
Merged
Merged
Conversation
Contributor
Author
|
Windows's wide strings got me again, damn it. One moment... |
N00byKing
requested changes
Mar 18, 2026
N00byKing
left a comment
Owner
There was a problem hiding this comment.
Reasoning for separate files sounds fair to me. Using std::filesystems is also good.
Just some comments, will try to get to testing in the weekend
std::min must be wrapped in parenthesis to prevent a macro from taking over and breaking it on Windows. It also wasn't too happy with size_ts, so we go back to using ints.
N00byKing
reviewed
Mar 22, 2026
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rewrites the data package caching system so that it stores game's data packages as separate files in a
.datapkg-cachesubfolder.The upshot of this? The async I'm a part of with 131 unique games now only takes about 7 or 8 seconds to start up with a completely empty data package cache, when it took over a minute to do so previously. (Obviously, YMMV; network latency affects this, but this should be even faster on archipelago.gg because we're sending a third of the requests.)
Do note that
std::filesystemis used to manage data package file paths and create the directory if it needs to be done. This shouldn't be a problem because APCpp already requires C++17 anyway, but just in case I figured I'd mention it.