This pull request introduces a new Tree::filter method that allows skipping nodes of the B-Tree based on a predicate over each node's summary. This speeds up significantly Buffer::changes_since, which now scales with the number of changes that have occurred since the given version.
In the process of implementing this optimization, I also:
Discovered and fixed a bug in Buffer::longest_row (see 1bb91b1 for more details).
Removed unnecessary comparisons in Add and AddAssign for FragmentId (see c7d56ba).
This pull request introduces a new
Tree::filter
method that allows skipping nodes of the B-Tree based on a predicate over each node's summary. This speeds up significantlyBuffer::changes_since
, which now scales with the number of changes that have occurred since the given version.In the process of implementing this optimization, I also:
Buffer::longest_row
(see 1bb91b1 for more details).Add
andAddAssign
forFragmentId
(see c7d56ba)./cc: @nathansobo