public static void searchOptimized(@NotNull PsiMethod method,
                                     @NotNull SearchScope scope,
                                     boolean strictSignatureSearch,
                                     @NotNull SearchRequestCollector collector,
                                     boolean inReadAction,
                                     @NotNull PairProcessor<? super PsiReference, ? super SearchRequestCollector> processor) {
    final SearchRequestCollector nested = new SearchRequestCollector(collector.getSearchSession());
    collector.searchQuery(new QuerySearchRequest(search(new SearchParameters(method, scope, strictSignatureSearch, nested)), nested,
                                                 inReadAction, processor));
  }
public static void searchOptimized(@NotNull PsiMethod method,
                                     @NotNull SearchScope scope,
                                     boolean strictSignatureSearch,
                                     @NotNull SearchRequestCollector collector,
                                     boolean inReadAction,
                                     @NotNull PairProcessor<? super PsiReference, ? super SearchRequestCollector> processor)