Page MenuHomePhabricator

[clangd] Add AST config to prebuild ASTs
AbandonedPublic

Authored by DaanDeMeyer on Nov 15 2020, 2:23 PM.

Details

Reviewers
sammccall
kadircet
Group Reviewers
Restricted Project
Summary
The new AST config allows prebuilding the ASTs for files in a
compilation database when a single file in that compilation database
is opened by the client. This reduces latency when opening subsequent
files in the same compilation database. This matters in large
codebases where building the AST can take multiple seconds.

This is still missing tests and more documentation but I wanted to get some feedback first before continuing.

Diff Detail

Event Timeline

DaanDeMeyer created this revision.Nov 15 2020, 2:23 PM
DaanDeMeyer requested review of this revision.Nov 15 2020, 2:23 PM
nridge added a subscriber: nridge.Nov 15 2020, 2:29 PM
DaanDeMeyer retitled this revision from [clangd] RFC: Add --prebuild-asts option to [clangd] Add AST config to prebuild ASTs.
DaanDeMeyer edited the summary of this revision. (Show Details)

Switched from all or nothing command line option to per file config.

Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2020, 3:56 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Fixed formatting

Fix all the bugs after doing some proper testing.

One thing we don't handle yet is header files since those don't appear in the compilation database. Maybe we need to add prebuilding for those as well?

DaanDeMeyer abandoned this revision.Nov 18 2020, 2:57 PM

Abandoning as the end result is too slow even when including a limited number of files.