temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Dynamic config conversion improvements

Open dnr opened this issue 1 year ago • 0 comments

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

dnr avatar Jan 07 '25 14:01 dnr