client-rust icon indicating copy to clipboard operation
client-rust copied to clipboard

Feature: Support CompactString

Open PlainBane opened this issue 1 year ago • 2 comments

Hi, Could you consider adding support for CompactString as an alternative for String in structs with small string values. It would add a bit of performance improvement when using structs.

PlainBane avatar Jul 28 '24 19:07 PlainBane

Can you please explain how you plan to use it? I'll see if I can get it implemented.

ohsayan avatar Dec 14 '24 07:12 ohsayan

I use it in Axum http api structs (To optimize small string values). So if I Serialize / Deserialize struct, there are lots of CompactString instead of String. If I then use skytable to cache some of this data, I end up having to convert CompactString -> String and back. I could try to add it myself and do pr. Thanks.

PlainBane avatar Dec 14 '24 08:12 PlainBane