oramasearch/orama

Memory usage: all strings seem to be duplicated

masylum opened this issue · 2 comments

Describe the bug

I have no idea if it's a bug, feel free to dismiss otherwise.
I'm profiling an app I'm building with orama, and I see that all the strings are duplicated, but one is in lower case and the other is not.

CleanShot 2024-06-16 at 23 53 09

if it helps, those are the retainer objects of two of the strings:
CleanShot 2024-06-16 at 23 55 14
CleanShot 2024-06-16 at 23 55 45

To Reproduce

Open the heap profiler in chrome and once you have the snapshot, check the strings.

Expected behavior

Only one copy of the string being in memory (ideally, no idea if there is a limitation)

Environment Info

Chrome 125

Affected areas

Initialization, Environment/OS

Additional context

thanks for orama, is fantastic!

We're aware of this situation and we're actively working on a fix that will be released in Orama v3.0.0. Please keep following us on Twitter or here on GitHub to get notified when we'll announce the fix!

awesome!