Don't de/serialize item components for NUTRIENT_OVERRIDE items. Add NUTRIENT_OVERRIDE to a bunch of grain items.#85587
Merged
dseguin merged 2 commits intoCleverRaven:masterfrom Feb 28, 2026
Merged
Conversation
…UTRIENT_OVERRIDE to a bunch of grain items.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Performance "Save map size by not serializing unnecessary item components."
Purpose of change
While debugging #85342 I noticed some excessively large map files. This was due to processed grains storing their entire chain of source items in their components tree. In the given debug save this was ~20% of the entire save.
Describe the solution
Add NUTRIENT_OVERRIDE to a bunch of grain processing items (wheat/barley/buckwheat/corn, to name a few), and then add an additional check to item::io to not de or serialize the components for items with flag_NUTRIENT_OVERRIDE.
Describe alternatives you've considered
Testing
Loaded and saved the large map tile in the linked issue, it shrank a lot (it was a storage shed on a farm with a ton of buckwheat and corn and barley).
Additional context