in reply to Optimizing Memory consumption

If your data structures are of similar kind you could use Data::Reuse to reduce the memory