improve serialization performance