2 ms·
Another huge one on Windows and especially .NET is if you see a MemoryStream replace it with a FileStream that uses DELETE_ON_CLOSE semantics. It bypasses the .
by fleitz 16y ago
Another huge one on Windows and especially .NET is if you see a MemoryStream replace it with a FileStream that uses DELETE_ON_CLOSE semantics. It bypasses the .NET GC and lets the kernel decide whether it actually wants to write the file out. So if you've got a 1GB file that you need temporarily it will write part of it to disk depending on how much RAM is available.