Avoid serializing empty collections

Serializing empty collections can be surprisingly wasteful! This post describes a technique which speeds up things and reduces the data size! And the principle behind this technique is simple: avoid serializing empty collections. If your objects contain many empty collections this can make a big difference as you’ll see. We’ll reduce the data size by more than 80% and requires 60% less time to serialized and deserialize for our simple example class. (more…)

Continue Reading
Close Menu