mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
57d3b9e2ca
Summary: elementsThatOverlapOffsets was quite inefficient as it was doing a linear scan over all items without an early out for each input offset. The number of items can be large, so we'd want to use binary search here. Before: O(MN), where M is the # offsets and N is the # items After: O(MlogN) As a utility method, elementsThatOverlapOffsets should not be responsible for checking that the offsets are in increasing order 'binary-search' dep added via https://www.internalfb.com/intern/wiki/React_Native/Building_Product_Experiences/Third_Party_Packages_(npm)/ Changelog: [Internal] - Modify VirtualizeUtils.elementsThatOverlapOffsets to use binary search Reviewed By: javache Differential Revision: D36292326 fbshipit-source-id: 5f22eb5533b69e2ebe5c1cb34e4f82605838f0a7