_write_metadata_file
into a background thread to avoid building metadata in the main thread. This is not all that costly, but it is O(n) where n is the number of arrays in the tree, so it can start to add up for trees with a lot of parameters.
#1001