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

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 03:02:49 PDT 2019


sammccall marked 3 inline comments as done.
sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/TUScheduler.h:145
 
-  /// Schedule an update for \p File. Adds \p File to a list of tracked files if
-  /// \p File was not part of it before. The compile command in \p Inputs is
----------------
kadircet wrote:
> Is the `Adds \p File to a list of tracked files if ...` part got deleted intentionally?
It's now covered by the last line.


================
Comment at: clang-tools-extra/clangd/index/Background.h:106
   std::vector<Task> Queue; // max-heap
+  llvm::StringMap<unsigned> Boosts;
 };
----------------
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?


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