update_output_to_name is extremely hot code during serialisation as it is called for every single filling. The previous implementation supported output being both an object and a dict, but there is no way to change the type of output - it is always a dict, so this functionality was never used.
Because this support involved a try except block, which are generally slow, it caused a significant performance issue.
Serialising a real world dataset with a list of objects containing ~5700 total keys, a 10% performance improvement was obtained by removing this try except block.
update_output_to_name is extremely hot code during serialisation as it is called for every single filling. The previous implementation supported output being both an object and a dict, but there is no way to change the type of output - it is always a dict, so this functionality was never used.
Because this support involved a try except block, which are generally slow, it caused a significant performance issue.
Serialising a real world dataset with a list of objects containing ~5700 total keys, a 10% performance improvement was obtained by removing this try except block.