]> granicus.if.org Git - clang/commit
[FileManager] Do not call 'real_path' in getFile().
authorEric Liu <ioeric@google.com>
Fri, 24 Aug 2018 08:59:54 +0000 (08:59 +0000)
committerEric Liu <ioeric@google.com>
Fri, 24 Aug 2018 08:59:54 +0000 (08:59 +0000)
commit18c0403c9a977b47a170fba2d9e6f2956ffcf7c7
treecc1963e0feb0555276f2f7029f9c01d2b5d4e9cd
parente24ad3390ffe53acb284a1a6288bad22134bf80a
[FileManager] Do not call 'real_path' in getFile().

Summary:
This partially rolls back the change in D48903:
https://github.com/llvm-mirror/clang/commit/89aa7f45a1f728144935289d4ce69d8522999de0#diff-0025af005307891b5429b6a834823d5eR318

`real_path` can be very expensive on real file systems, and calling it on each
opened file can slow down the compilation. This also slows down deserialized
ASTs for which real paths need to be recalculated for each input files again.

For clangd code completion latency (using preamble):
Before
{F7039629}
After
{F7039630}

Reviewers: ilya-biryukov, simark

Reviewed By: ilya-biryukov

Subscribers: kadircet, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340598 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/FileManager.cpp