[all-commits] [llvm/llvm-project] 1abb88: [clangd] Don't traverse the AST within uninteresti...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue May 26 01:34:25 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1abb883a048153c83a4e11070219d23f362e7377
      https://github.com/llvm/llvm-project/commit/1abb883a048153c83a4e11070219d23f362e7377
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-05-26 (Tue, 26 May 2020)

  Changed paths:
    M clang-tools-extra/clangd/index/IndexAction.cpp
    M clang-tools-extra/clangd/unittests/IndexActionTests.cpp
    M clang/include/clang/Index/IndexingAction.h
    M clang/include/clang/Index/IndexingOptions.h
    M clang/lib/Index/IndexDecl.cpp
    M clang/lib/Index/IndexingAction.cpp

  Log Message:
  -----------
  [clangd] Don't traverse the AST within uninteresting files during indexing

Summary:
We already skip function bodies from these files while parsing, and drop symbols
found in them. However, traversing their ASTs still takes a substantial amount
of time.

Non-scientific benchmark on my machine:
  background-indexing llvm-project (llvm+clang+clang-tools-extra), wall time
  before: 7:46
  after: 5:13
  change: -33%

Indexer.cpp libclang should be updated too, I'm less familiar with that code,
and it's doing tricky things with the ShouldSkipFunctionBody callback, so it
needs to be done separately.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80296




More information about the All-commits mailing list