chore: Refactor global_properties to use the registry pattern#873
Merged
RobertJacobsonCDC merged 3 commits intoMay 7, 2026
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
|
k88hudson-cfa
approved these changes
May 5, 2026
Collaborator
k88hudson-cfa
left a comment
There was a problem hiding this comment.
This looks good with a couple of small cleanup things. For the record I don't believe the which/that change is justified, but I wouldn't block on it
Collaborator
Author
Alright, alright! Reverted! |
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
|
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.
This PR refactors global property storage out of the data plugin system and into
Contextdirectly. The original hash map based storage is replaced with the "registry pattern" we use for data plugins, entities, and other things elsewhere:set_global_property_valueandget_global_property_valuenow index directly intoContext::global_propertiesusingT::id().I also removed the unused string-based getter mechanism.
Unfortunately, the name-based registration and loading machinery is otherwise left intact, so
load_global_properties,add_global_property, and the serialized lookup path continue to work through the existing accessors. The reason is that theload_global_propertiesuses a string name-based lookup, and it's not clear how to refactor this while also retaining source compatibility with existing code.On the other hand, if we are willing to break source compatibility, we might as well wait until we have a better idea of the alternative design for global parameters in order to do so, so we don't give client code whiplash.
Client code should remain source compatible for this PR.