temporal
temporal copied to clipboard
Dynamic config conversion improvements
What changed?
- Split implementation of "constrained default" settings from "plain default" settings. This is more code and the diff looks complex, but the individual paths are both simpler than the mixed version.
- Add conversion cache using a weak map.
- Remove GlobalCachedTypedValue.
- Use "raw" values for subscription dispatch deduping to avoid unnecessary conversions.
- Deep copy default values when using mapstructure, to avoid problems with merging over shared default values.
Why?
- Fixes #6756
- Performance improvement for "plain default" settings (almost all of them)
- Performance improvement for settings with complex converters
- Remove footgun in defaults that aren't scalar values
How did you test it?
existing+new unit tests