[PATCH] D15490: [libclang] Add a flag to create the precompiled preamble on the first parse.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 03:51:58 PST 2015


bkramer created this revision.
bkramer added reviewers: doug.gregor, klimek.
bkramer added a subscriber: cfe-commits.

The current default is to create the preamble on the first reparse, aka
second parse. This is useful for clients that do not want to block when
opening a file because serializing the preamble takes a bit of time.
However, this makes the reparse much more expensive and that may be on the
critical path as it's the first interaction a user has with the source code.

YouCompleteMe currently optimizes for the first code interaction by parsing
the file twice when loaded. That's just unnecessarily slow and this flag
helps to avoid that. Sadly I don't see a way to test this as it only
affects performance.

http://reviews.llvm.org/D15490

Files:
  include/clang-c/Index.h
  include/clang/Frontend/ASTUnit.h
  lib/Frontend/ASTUnit.cpp
  tools/libclang/CIndex.cpp
  tools/libclang/Indexing.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15490.42702.patch
Type: text/x-patch
Size: 11724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151214/a5eae7e4/attachment.bin>


More information about the cfe-commits mailing list