[all-commits] [llvm/llvm-project] 35ce74: [clangd] Store paths as requested in PreambleStatC...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Tue May 23 05:32:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35ce741ef3e3dd9db1da3ea0a06c565cb90f665a
      https://github.com/llvm/llvm-project/commit/35ce741ef3e3dd9db1da3ea0a06c565cb90f665a
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M clang-tools-extra/clangd/FS.cpp
    M clang-tools-extra/clangd/FS.h
    M clang-tools-extra/clangd/unittests/FSTests.cpp

  Log Message:
  -----------
  [clangd] Store paths as requested in PreambleStatCache

Underlying FS can store different file names inside the stat response
(e.g. symlinks resolved, absolute paths, dots removed). But we store path names
as requested inside the preamble,
https://github.com/llvm/llvm-project/blob/main/clang/lib/Serialization/ASTWriter.cpp#L1635.

This improves cache hit rates from ~30% to 90% in a build system that uses
symlinks.

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




More information about the All-commits mailing list