This means lots of memcpy and it's all done inside of the mutex. Can you refactor the code such that InputSummary directly takes `char* output` (parameter of Summary) and returns the size (so that you can keep writing) (maybe Summary can also take `char **output` and advance the pointer automatically)? You can do similar thing with FileSizeSummary.