updated_parameter_definition() (and similar ways to update values) always parses the new (default) value before comparing it to the old one which can make the call very slow. This PR modifies the code such that we parse the value only if absolutely necessary. This makes cases where the values are completely different (e.g. updates from None to Map) or cases where the values are exactly the same (in database representation) much faster, up to over 300 times according to the performance benchmarks included.
updated_parameter_definition()
(and similar ways to update values) always parses the new (default) value before comparing it to the old one which can make the call very slow. This PR modifies the code such that we parse the value only if absolutely necessary. This makes cases where the values are completely different (e.g. updates from None to Map) or cases where the values are exactly the same (in database representation) much faster, up to over 300 times according to the performance benchmarks included.No associated issue.
Checklist before merging