I came across a spring-project with a lot of <T> CrudRepository
implementations, where lists of objects where saved frequently in two different manners:
repository.saveAll(List.of(content));
and
List.of(content).forEach(Repository::save);
I was wondering, is thesaveAll
manner better performance-wise?