Repository navigation
0.4.122
Add hasSubtreeCounts() for O(1) check before count-slice Old databases restored from storage may have Branch nodes with subtreeCount = -1 (unknown). In that case, countSlice degrades from O(log n) to O(n) as it materializes entire subtrees. This method lets callers (e.g. Datahike's query planner) check upfront and fall back to heuristic estimates instead of paying the O(n) cost during planning.