-
Notifications
You must be signed in to change notification settings - Fork 502
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 DepotManifest Serialization #1337
Conversation
Replaced List<byte[]> with HashSet<byte[]> using a custom ChunkIdComparer for efficient chunk ID uniqueness checks
Why does it even need to check for duplicates? |
I'm not entirely sure why the original author included the duplicate checks—probably had a good reason. I just worked on speeding up the process they set up. 🤷♂️ |
BTW, I'm thinking of making the |
Because Valve's manifest format stores the number of unique chunks, I just followed it. |
I checked the original PR and I don't know why I didn't make Serialize public, to be honest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sold on the exception handling but the core of the change looks good.
btw congrats on getting PR number 1337 😉 |
This PR builds on PR #1113, introducing a
HashSet
withChunkIdComparer
to manage unique chunks inDepotManifest
serialization, significantly reducing processing time.My comment
Changes:
List<byte[]>
withHashSet<byte[]>
for unique chunks.ChunkIdComparer
for efficient byte array comparison.Impact:
This optimization streamlines serialization, especially for large manifests, enhancing performance without data integrity loss.