I have recently upgraded the .NET framework on my machine to .NET 4.6 and have noticed a big difference in times of binary (de)serialization of objects from/to files.
For example, I have a 10MB file which was deserialized in ~2 seconds on my machine with .NET 4.5.2. After upgrading to .NET 4.6 it takes up to 50 seconds(!) - actual time is pretty random: sometimes it takes 2 seconds, sometimes 50 seconds (same file, same program, even same process).
Has anybody else noticed similar behavior and maybe found a workaround (or solution) for this issue?
Little reason to assume it has anything to do with binary serialization, it is pretty deterministic. Given the random behavior and the likelihood that you'll poke the garbage collector pretty heavily with a 10 megabyte file, a very good candidate is this bug. Quite a doozy.
If you have a good repro then use the new Diagnostics Tools to see any slow gen #1 collections. And tinker with GCSettings.LatencyMode, if it has an affect then you know it is the underlying cause. Should be fixed soon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With