improved memory consumption with a very large set of input files