Optimize table serialization