This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by sammccall on Jul 11 2019, 11:03 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Jul 11 2019, 11:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 11:03 AM

Add test for boosting in queue.

kadircet accepted this revision.Jul 12 2019, 2:55 AM
kadircet added inline comments.
clang-tools-extra/clangd/TUScheduler.h
145 ↗(On Diff #209273)

Is the Adds \p File to a list of tracked files if ... part got deleted intentionally?

clang-tools-extra/clangd/index/Background.h
106 ↗(On Diff #209273)

maybe store a QueuePriority instead of unsigned? Also it seems like the enum belongs to BackgroundQueue, rather then BackgroundIndex

This revision is now accepted and ready to land.Jul 12 2019, 2:55 AM
sammccall marked 3 inline comments as done.Jul 12 2019, 3:02 AM
sammccall added inline comments.
clang-tools-extra/clangd/TUScheduler.h
145 ↗(On Diff #209273)

It's now covered by the last line.

clang-tools-extra/clangd/index/Background.h
106 ↗(On Diff #209273)

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?

kadircet added inline comments.Jul 12 2019, 3:08 AM
clang-tools-extra/clangd/index/Background.h
106 ↗(On Diff #209273)

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.

This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.