kadircet added inline comments.
================ Comment at: clang-tools-extra/clangd/index/Index.h:77 +struct RelationsRequest { + SymbolID Subject; + index::SymbolRole Predicate; ---------------- nridge wrote: > kadircet wrote: > > sorry for missing it in previous iteration. but this should also enable > > batch queries. let's make this one a `llvm::DenseMap<SymbolID>`. > > And in the callback we should output both the `SymbolID` of the `Subject` > > and `Object`. > > > > We have a network based index(internally) and it uses this batch query > > optimization to get rid of network latency. > What is an example use case for a batch query? In a typical LSP editor, the > user can only request a type hierarchy for one class at a time. yes, that's not really applicable to TypeHierarchy, but we are rather introducing another endpoint to an existing API(`SymbolIndex`), which will be used by a lot more clients later on. The first example that comes to my mind is, fetching all overrides of a class' virtual methods for example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62839/new/ https://reviews.llvm.org/D62839 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits