Today it was noted that it takes a long time to read many serialized lsst.verify.Measurement files using the butler. Part of this slow down is caused by them being serialized as YAML format (and using complex YAML object specifications). This was done on
DM-21875 as the simplest and quickest solution to the problem, given that we had no standardized API to look for in the JSON formatter (following the Pydantic model would possibly have been the right answer if we had known about it) but in hindsight I gave bad advice.
We need a new specialist Formatter that will use the Measurement write_json() API to write a JSON file. The read method should look at the file extension and read the existing YAML or the new JSON.
The question that vexed us in
DM-21875 was where such a formatter should go. Current policy (and in the absence of any progress on DM-26190) is to only write non-lsst formatters in daf_butler and to write lsst-specific formatters in obs_base.