reduce memory usage of metadata