Hi Krzysztof,
There are lots of factors that can impact memory usage. Also OutOfMemoryException sometimes does not mean that the program is out of memory – it can mean that the memory is too fragmented to allocate the desired amount of memory.
The first thing that I recommend that you do is to build in 64-bit mode. I have encountered situations where the Open-Xml-Sdk ran out of memory in 32-bit mode, but did not in 64-bit mode.
Certainly, the memory usage profile for 2.6 will be different from 2.5. Version 2.6 is based on System.IO.Compression, which will alter the pattern of memory usage. Version 2.5 was based on a weird, internal implementation of the ZIP file format, and I don’t know the details of the impact of these two libraries on memory usage. I am not surprised that they are different.
Unfortunately, I have been pulled from that project. I am no longer maintaining the Open-Xml-Sdk.
I suggest that you try with 64 bit mode. If that does not fix your issue, then I suggest that you create an issue on GitHub for this.
Cheers, Eric