This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Store paths as requested in PreambleStatCache
ClosedPublic

Authored by kadircet on May 23 2023, 12:52 AM.

Details

Summary

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.

Diff Detail

Event Timeline

kadircet created this revision.May 23 2023, 12:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 12:52 AM
Herald added a subscriber: arphaman. · View Herald Transcript
kadircet requested review of this revision.May 23 2023, 12:52 AM
hokein accepted this revision.May 23 2023, 3:59 AM

good catch!

This revision is now accepted and ready to land.May 23 2023, 3:59 AM
This revision was automatically updated to reflect the committed changes.