protobuf operation

quite impressed by protobuf performance, that the built in implementation is even better than streaming earlier:

models.toBuilder().clear().mergeFrom(
Files.list(..).filter(Files::isRegularFile)
.map(Path::toFile)
.filter(file -> ...)
.collect(Collectors.toList())
.parallelStream()
.map(file -> ..)
//read into protobuf
.reduce((m1, m2) -> m1.toBuilder().mergeFrom(m2).build())
.orElseGet(()->