libBigWig
libBigWig copied to clipboard
Search improvement ?
Hello @dpryan79, I was wondering if this could potentially speed up the library.
During the walkRTreeNodes process, the library seems to iterate through all children to figure out if a block overlaps with the current region or not either in overlapsLeaf or overlapsNonLeaf
Instead can this use a binary search approach to find an overlapping block and search the neighborhood for all overlaps ? I'm trying to think of a scenario why this would fail but let me know if you have any thoughts on this
@jkanche I expect that would work, I think at the time I expected the performance benefit to be relatively small, since there are usually only a smallish number of child nodes to iterate over. Perhaps the improvement is more substantial though. If you're interested in putting together a PR that implements that I'd be quite happy to give it a look.