[cfe-dev] Announcing "clang-ctags"
Douglas Gregor
dgregor at apple.com
Thu Jul 26 08:37:15 PDT 2012
On Jul 26, 2012, at 2:11 AM, David Röthlisberger <david at rothlis.net> wrote:
> On 23 Jul 2012, at 22:54, Sean Silva wrote:
>> Ouch. This [running clang-ctags] is longer than compiling it!
>
> Here's something I found quite interesting:
>
> When I run clang-ctags over clang/lib/Analysis/AnalysisDeclContext.cpp
> it reports†that the call to clang_parseTranslationUnit takes 6.4s.
>
> Giving the same compilation command directly to clang++ takes 1.4s.
>
> This is a huge discrepancy, given that clang_parseTranslationUnit is
> only doing parsing, whereas clang++ is parsing *and* compiling! Even
> with -O3 clang++ only takes 1.6s. What can explain this?
Perhaps it's building a precompiled preamble, which is only worthwhile if you're going to reparse the same file many times. Try setting the environment variable LIBCLANG_TIMING=1 to see if anything odd shows up in the internal timing log; if not, please grab a profile!
- Doug
More information about the cfe-dev
mailing list