-
Notifications
You must be signed in to change notification settings - Fork 206
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
Redundant metadata cleanup #5512
Merged
Merged
Conversation
This file contains 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
johnhaddon
force-pushed
the
metadataImprovements
branch
from
October 25, 2023 15:45
00e260a
to
b12d971
Compare
LGTM This looks like it will be a very nice improvement to file size and loading times for some cases. It took a couple minutes to wrap my head around the different |
ericmehl
approved these changes
Nov 1, 2023
…ry-internal-plug SceneAlgo : `ObjectProcessor` object history fix
This avoids further redundant metadata promotion.
As well as being logical, this also prevents us from copying metadata unnecessarily onto BoxIn and BoxOut nodes.
johnhaddon
force-pushed
the
metadataImprovements
branch
from
November 2, 2023 14:21
d0820da
to
c9b4c6b
Compare
Rebased to fix the traditional Changes.md merge conflict, and merging now. |
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.
This PR was motivated by the horrible realisation that for at least one large production template, a significant chunk of the file size and a quarter of the load time is taken up by metadata registrations that are completely redundant. They're redundant because they're instance-level overrides with exactly the same value as the static type-based registrations that don't need to be stored in the file at all. So this PR fixes a bunch of problems to prevent such metadata being created again in future, and adds a menu item folks can use to clean up their files.
This required a bit more work than I wanted to do initially, because
MetadataAlgo::deregisterRedundantValues()
needed the ability to query instance-based and type-based registrations separately. This required the newMetadata::value()
overloads taking aRegistrationTypes
bitmask to say which types to consider. Although it's a bit wordier than the original, it's more flexible than the two oldinstanceOnly, persistentlyOnly
arguments which only exposed half the possibilities. So hopefully this seems like a reasonable improvement. Technically it would have been possible to implementderegisterRedundantValues()
without this change, but only by speculatively removing each instance value to see if it changed the result, and putting it back if it did. But I couldn't stomach that approach, mostly because of the storm of unnecessaryvalueChangedSignals()
we'd be emitting.