This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Allow consumption of DocIDs without overhead
AbandonedPublic

Authored by kbobyrev on Aug 10 2018, 11:35 AM.

Details

Reviewers
None
Summary

This patch allows processing DocIDs from iterator using callback so that they are not stored in a vector if actual DocIDs are not needed.

Such overhead is the case for D50337 patch: fuzzyFindLongQuery stores SymbolDocIDs but they are thrown away later, because what the index really needs is std::vector<std::pair<float, const Symbol *>> Scores; and it can be filled on-the-fly in matchSymbols.

Diff Detail

Event Timeline

kbobyrev created this revision.Aug 10 2018, 11:35 AM
kbobyrev abandoned this revision.Aug 13 2018, 5:02 AM

As discussed, this is not a very clean API for the user interaction and it's OK to leave consume() as is.