chat gpt seems to think so In general, it is more gas efficient to store a long string in a mapping instead of a struct if the struct is often referenced for other attributes.
When a struct is stored, all of its attributes are stored contiguously in memory. This means that if the struct contains a long string, every time the struct is accessed or modified, the entire string will need to be read from or written to memory, which can be expensive in terms of gas costs.
Apr 24, 2023, 8:51 PM