improve time measurement of metadata generation