[PATCH] D64575: [clangd] Prioritize indexing of files that share a basename with the open file.

Kadir Cetinkaya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 03:09:00 PDT 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/index/Background.h:106
   std::vector<Task> Queue; // max-heap
+  llvm::StringMap<unsigned> Boosts;
 };
----------------
sammccall wrote:
> kadircet wrote:
> > maybe store a `QueuePriority` instead of unsigned? Also it seems like the enum belongs to BackgroundQueue, rather then BackgroundIndex
> This is a layering thing: the queue knows about tasks and tags, but doesn't know about TUs, filenames, or active files. I don't plan on actually splitting this header out, but it helps me reason about the code. Do you think it's too abstract?
Nah that's OK.

Queue has become more priority aware after this patch, previously it only cared about the priority within the task struct. Therefore it become confusing to see the enum in `BackgroundIndex` itself.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64575/new/

https://reviews.llvm.org/D64575





More information about the llvm-commits mailing list