help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A guide on setting up C/C++ development environment for Emacs


From: Óscar Fuentes
Subject: Re: A guide on setting up C/C++ development environment for Emacs
Date: Wed, 27 Aug 2014 20:31:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

solidius4747@gmail.com writes:

> Because real parsing takes time and such a task, while possible using
> Emacs Lisp, but is too much for current Emacs implementation. CEDET
> does some nice optimizations to speed it up as fast as it can: idle
> parsing, caching and incremental parsing to reduce computational time.
> Consider someone using Clang to generate tag database:
> https://github.com/drothlis/clang-ctags#performance:
>
> "Running clang-ctags over a much larger input, such as the entire llvm
> C/C++ sources (7k files, 1.8 million lines of code) took 98 minutes
> and a peak memory usage of 140MB."
>
> It's just 1.8 million lines of code. And that's Clang.

That's a problem of clang-ctags being slow, not Clang being *so* slow,
because Clang can compile its own sources on a fraction of time of those
98 minutes (15 minutes here on a 6 year old 4core machine, for an
optimized build.)

> GNU Global only
> needs a few minutes to generate tag database for Linux kernel, which
> is more than 14 million lines of code and more than 40k files. Do you
> say Clang is worse than GNU Global?

I'll say that parsing those 1.8 MLoc of C++ code is much more demanding
than parsing 14 MLoc of C code. And the level of analysis GNU Global
does is incomparable with a real compiler and it is a long stretch to
put it on the same tool category as Clang (or even Semantic's own
parser.)

GNU Global has its uses, but C++ auto completion needs Clang, which is
accurate but slow. I can't see how CEDET could be acceptably fast and
accurate at the same time.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]