datacrypt-project / hitchhiker-tree

Functional, persistent, off-heap, high performance data structure
Eclipse Public License 1.0
1.19k stars 64 forks source link

garbage collection? #28

Open benoitc opened 7 years ago

benoitc commented 7 years ago

You don't describe how you handle the garbage collection, can you give any hint on how you do it?

dgrnbrg commented 7 years ago

Sure! First of all, GC is a property of the backend, so that it can be optimized for the backend's performance characteristics (cheaper reads vs writes, cheaper point queries vs scans).

For the Redis backend, the GC is refcounting (there's a file in docs/ that goes into detail). For other backends, there's a new experimental tracing GC that avoids extra writes, and instead batches up the GC work.