dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Search: Reduce memory overhead by 25% by replacing of std::pmr::string

Open dranikpg opened this issue 1 year ago • 2 comments

Create lightweight immutable string type that can only be deleted externally, hence it doesn't have to store it's allocator pointer

PS: 25 when all strings are inlined, obviously it's less for large datasets

dranikpg avatar Dec 18 '23 19:12 dranikpg

Hi, this enhancement sounds promising. I can help if you need. Could you share more about the design? I didn't find std::pmr::string in ./src. Which files would be impacted?

azuredream avatar Jan 11 '24 16:01 azuredream

Hi! It's used in src/core/search/sort_index

Please note that task is not that simple because it requires some trickery to make it more or less safe and container compatible 🙂 If you want to take it up, please make sure to first dive into the context on how it's used

dranikpg avatar Jan 13 '24 14:01 dranikpg