My application makes heavy use of Paths and streams a large number of individual points from our server. The TimeInterval.intersect
call came up as a hotspot when I profiled our app. My understanding is that the intervals
TimeIntervalCollection referenced is ordered. If that is the case, would it be possible to use TimeIntervalCollection.indexOf
to get the indexes of the “bounding” intervals and process that subset? It looks like the binary search in indexOf would be faster than the linear scan and intersection. Am I understanding that correctly?