[clangd] Cleanup FuzzyFindRequest serialization and dex benchmark

* Due to the LLVM's JSON library changes (?), FuzzyFindRequest serialization is
  no longer valid since arrays are serialized as llvm::json::Array already.
  Hence, current implementation creates a nested array.
* YAML format is no longer the default, mention this for the benchmark.
* FIXME is no longer relevant. I ran benchmarks that showed no improvement with
  priority_queue years ago.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D106432
This commit is contained in:
Kirill Bobyrev 2021-07-21 14:50:40 +02:00
parent d6da02d952
commit 907efdf95d
3 changed files with 4 additions and 5 deletions

View File

@ -106,7 +106,7 @@ BENCHMARK(DexBuild);
int main(int argc, char *argv[]) {
if (argc < 3) {
llvm::errs() << "Usage: " << argv[0]
<< " global-symbol-index.yaml requests.json "
<< " global-symbol-index.dex requests.json "
"BENCHMARK_OPTIONS...\n";
return -1;
}

View File

@ -49,12 +49,12 @@ bool fromJSON(const llvm::json::Value &Parameters, FuzzyFindRequest &Request,
llvm::json::Value toJSON(const FuzzyFindRequest &Request) {
return llvm::json::Object{
{"Query", Request.Query},
{"Scopes", llvm::json::Array{Request.Scopes}},
{"Scopes", Request.Scopes},
{"AnyScope", Request.AnyScope},
{"Limit", Request.Limit},
{"RestrictForCodeCompletion", Request.RestrictForCodeCompletion},
{"ProximityPaths", llvm::json::Array{Request.ProximityPaths}},
{"PreferredTypes", llvm::json::Array{Request.PreferredTypes}},
{"ProximityPaths", Request.ProximityPaths},
{"PreferredTypes", Request.PreferredTypes},
};
}

View File

@ -207,7 +207,6 @@ private:
return OS;
}
// FIXME(kbobyrev): Would storing Children in min-heap be faster?
std::vector<std::unique_ptr<Iterator>> Children;
friend Corpus; // For optimizations.
};