mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-14 00:20:23 +00:00
Binary searches through different ranges of file sizes to create search queries with fewer than 1000 results. This is required since github will only return the first 1000 result of any search query. The implementation handles the case where some files may be deleted while the search is running, and (possibly artificially) assures that the number of files increases monotonically as the filesize range grows. The implementation also caches queries and is expected to make fewer than O((#files/1000) * lg(max file size)) API calls to retrieve the range queries that can be used to index all of the files. In practice running the search splitting takes a few minutes, while retrieving all of the data takes a few hours.