Iterations | WithoutGroups (MB) | WithGroups (MB) |
---|---|---|
10,000 | 8.8 | 0.0 |
50,000 | 39 | 0.4 |
100,000 | 80 | 0.8 |
200,000 | 160 | 1.5 |
300,000 | 321 | 2.3 |
This test harness creates an object that causes a high frequency of fragmentation on the large object heap when serialized with protobuf-net.
An issue has been opened up with protobuf-net.
Large Object Heap (LOH) allocation and fragmentation is caused when ProtoBuf is left in it's default configuration. If you enable groups then LOH allocation and fragmentation will be reduced to nothing. For more detail see this comment and this StackOverflow question.