LLVM, Clang Development IDEs

I have been able to build clang and support programs such as
clang-tidy, etc. from the command line using a series of command
scripts.

I'm used to using Eclipse CDT as an IDE for C/C++ projects.

What IDEs do llvm and clang developers use on Linux?

I'm used to using Eclipse CDT as an IDE for C/C++ projects.

Eclipse works ok on Linux, with nice code browsing and navigation
tools. I also recommend Mylyn, if you go down that path.

But the GDB integration, general speed and the memory usage is sub-par.

Since CDT never really took off, and other Java IDEs are better
(IntelliJ, for instance), I think Eclipse is doomed to be slowly
forgotten over the years, just like Cobol and Java.

I tried Code Blocks, KDevelop and Sublime, none of them good enough
for a large and specialised project like LLVM (they either require
their own build system integration, or they have no idea what's a
build system). They also had really poor code navigation tools, so
they all scored less than Eclipse, which is saying something!

I also tried Emacs to stop the nagging from some colleagues, but after
a few weeks, my fingers were hurting, and I hadn't been able to make
it into an easier and more competent environment than vim.

In the end, I went back to vim and I'm happy again.

What IDEs do llvm and clang developers use on Linux?

<flame> *real* developers use vim </flame> :smiley:

With clang-complete, clang-check and clang-format added to vim, and
plugins like vim-project, ctrlp and nerd tree, there is no reason to
use any heavier editor. GDB has a TUI mode, which is really helpful
and a lot more stable than most IDEs integration layers. What sets vim
apart from others like Emacs, at least for me, is that I can reliably
edit remote files using sshfs, and there is no noticeable slow down,
while all other editors suffer and die constantly in those situations.

cheers,
--renato

Technically, I’m not an LLVM or Clang developer [by which I mean, I’m not contributing code to LLVM or Clang, although I do have a patch for clang that may make it in at some point], but I do use Emacs with cscope.

I’m not trying to start a war with Renato about “vi(m) vs (x)emacs” - it’s pointless, it’s just one of those choices one makes at some point in life - once you know enough to do things with ease in one, you end up not liking the other. I have been using emacs, more or less continuously, for the past 32 years, and although I have professionally used both Eclipse and Visual Studio - and they are competent and good tools, I find myself, at least on Linux, always falling back to some variant of Emacs, because I know how to do things there. I’m sufficiently damaged that I type ESC+w to copy text in the browser - which of course doesn’t work… :frowning:

Technically, I'm not an LLVM or Clang developer [by which I mean, I'm not
contributing code to LLVM or Clang, although I do have a patch for clang
that may make it in at some point], but I do use Emacs with cscope.

Honest question: how does cscope copes with C++11 constructs? I
finally gave up emacs when cscope was the only thing I could use and
it wasn't enough. Maybe I missed something?

I'm not trying to start a war with Renato about "vi(m) vs (x)emacs" - it's
pointless,

That was a joke. :slight_smile:

it's just one of those choices one makes at some point in life -
once you know enough to do things with ease in one, you end up not liking
the other.

Yup. Especially as you get older... :slight_smile:

I'm sufficiently damaged that I type ESC+w to copy text in
the browser - which of course doesn't work... :frowning:

I type :wq and "i" everywhere, too. :slight_smile:

cheers,
--renato

> Technically, I'm not an LLVM or Clang developer [by which I mean, I'm not
> contributing code to LLVM or Clang, although I do have a patch for clang
> that may make it in at some point], but I do use Emacs with cscope.

Honest question: how does cscope copes with C++11 constructs? I
finally gave up emacs when cscope was the only thing I could use and
it wasn't enough. Maybe I missed something?

I have not tried on big projects, but I use cscope on C++ in my hobby
project compiler, which uses limited C++11 features, and it's not failing
in any obvious way for this use-case. But llvm is "out of tree", and I
typically use google and the online doxygen pages for LLVM searches.

My main use is in my day-job, which is nearly all C, so C++11 is not a big
issue - but the build we use has all of clang and llvm in the sources, and
cscope is not failing in any obvious way, and I can search for "getType"
and it finds a load of them. But I'm sure there may be more subtle things
that I don't notice because when I use cscope in this project, I'm
typically searching for C symbols, not C++ things.

> I'm not trying to start a war with Renato about "vi(m) vs (x)emacs" -
it's
> pointless,

That was a joke. :slight_smile:

Sorry, my "sarcasticly pointing out the pointlessness of a editor
flame-war" obviously didn't have the (right) sarcasm font... :wink:

> it's just one of those choices one makes at some point in life -
> once you know enough to do things with ease in one, you end up not liking
> the other.

Yup. Especially as you get older... :slight_smile:

I've been old quite some time now... :wink:

[Please reply *only* to the list and do not include my email directly
in your reply. Thanks.]

I posted on this previously and have had great success using CLion:
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-February/041418.html&gt;

CLion has since been released and is no longer in early access program
builds. I recommend it highly for CMake projects. It works great for
CLang IMO.

TL;DR History of the reviewer:

- 1978: My first real editor was TECO, the ancestor of emacs. IDEs were
  non-existent. I liked having an editor that was programmable. I
  still have a soft spot for TECO even though TECO programs read like
  a binary file.

- 1982: My second editor was vi. I liked the modes (insert/navigate)
  because it's similar to TECO and did visual presentation of my file
  better than the macro package add-ons for TECO. (Mostly this is saying
  "I like curses.") I still use vi for many small day-to-day editing
  tasks, mostly email messages like this one.

- 1988: My third editor and first IDE was emacs. Handling multiple open
  files was great but the lack of insert/navigation modes hurts my pinky
  finger. (Old joke: EMACS stand for Escape Meta Alt Control Shift.)
  First approximation to something called an "IDE" because it let me
  run the debugger and move a little => cursor over my source code as
  I single stepped. Emacs/gdb/M-x compile seems to have pretty much
  remained identical since this time and not significantly improved in
  any way for C/C++ development. Despite all the programmability of
  the editor, open source compilers remained deliberately crippled for
  extension making it nearly impossible to provide high quality automatic
  source-to-source transformations beyond simple find/replace operations
  or move beyond the batch-oriented Makefile paradigm of compiling.

- 1994: I played with the graphical GUI oriented software developer
  tools from SGI (CASEVision?). The emphasis seem to be on the pretty end
  of things and I remember it being slower than emacs/dbx/M-x compile,
  so I stuck with that.

- 1997: I played with Borland's C++ Builder IDE. I liked the VCL
  concept but I wasn't a fan of introducing non-ISO syntax into C++ in
  order to support it (for VCL's properties). I found the multitude
  of top-level windows with no ability to dock them into a single
  top-level window arrangement too annoying, so I never pursued any
  serious development using the IDE.

- 1998: My fourth editor (2nd IDE) was Visual C++ 6. This was the first
  time I started programming for Windows and I initially had a Windows
  version of emacs sitting side-by-side with VC6 for some editing tasks.
  Over time I learned the keyboard navigation of VC6, learned the project
  system, etc., and stopped using emacs for any code editing. This was
  my first real IDE that I used on a daily basis. I have continued to
  use this as my primary IDE on Windows as it evolved into Visual Studio
  from Visual C++. I have rarely used emacs since this time.

- 2007: ReSharper (JetBrains) and Visual Assist X (Whole Tomato) add-ons
  for Visual Studio. While not IDEs themselves, these are such
  a productivity boost for C# (ReSharper) and C++ (Visual Assist)
  development that the difference before and after is astounding.
  Visual Assist X introduced automated refactoring for native C++
  development. Their parser is ad-hoc but continues to be improved
  and the results are pretty good.
  <https://github.com/LegalizeAdulthood/refactor-test-suite/blob/master/results/VisualAssistXResults.md&gt;
  Other refactoring tool add-ons for native C++ development had promise
  but were too buggy or negatively impacted the speed of editing.
  Although they showed great promise, they were eventually discontinued.

- 2011: My fifth editor (3rd IDE) was IntelliJ from JetBrains for Java.
  I continued to use Visual Studio for C++ development. I tried using
  Eclipse for Java for about a month but it was really too painful and
  eclipse-using coworkers could neither explain to me how to get things
  to work properly or why things did what they did. A quick download of
  IntelliJ on their free trial and I never looked back. The refactoring
  support combined with structural analysis created an IDE that was
  truly like having a partner that helped me with the drudgery of coding
  while I concentrated on the creative part of coding. IntelliJ level
  of refactoring is the "Gold Standard" as far as I'm concerned.

- 2015: My sixth editor (4th IDE) was CLion (JetBrains) for C++
  development on Linux. JetBrains also introduced the ReSharper for C++
  add-on for C++ development on Windows with Visual Studio. I tried the
  early access program builds for CLion for several months, primarily
  working on my contributions to clang-tidy. It's really a tailored
  version of the IntelliJ IDE for native C++ development using CMake
  as a build system, so it wasn't like learning a new editor. CLion
  provides good automated refactoring support.
  <https://github.com/LegalizeAdulthood/refactor-test-suite/blob/master/results/CLionResults.md&gt;

For vim and C++ development you can find pretty mature tools/plugins like
Ycm (https://github.com/Valloric/YouCompleteMe) and Rtags (https://github.com/Andersbakken/rtags). Both of them are using libclang for completion and goto definition features. Ycm works on the actual buffer, while Rtags processes the whole project. A project is identified by the compilation_database.json file. In case of Ycm it is sometimes tricky to derive the compilation flags for headers, so I am using some heuristics for that (https://github.com/martong/ycm_extra_conf.jsondb). I am using both Ycm and Rtags to browse and edit the clang codebase and I am quite happy with them.
For debugging I am using vim’s --servername and --remote-send switches plus iterm2 to match file:line patterns and to navigate to that position in my running vim instance.

Note, Rtags can be used with emacs as well.

Cheers,
Gábor

Qt Creator + CMake + Ninja + LLDB

Qt Creator is very fast compared to every other IDE (including VS on Windows)
Code navigation is good, they have two plugins, new one uses Clang :slight_smile:
CMake integration is minimal and has some quirks
Starting the debugger is dog slow so I switched to LLDB. It’s visibly faster but still slow compared to VS where debugger starts almost instantaneously.

And yes I use editor in Vim mode

Mats, Renalto - Thanks for the information

I beg to differ that Eclipse CDT hasn't caught on. The originator of
Eclipse CDT, QNX, and the maintainers, use Eclipse CDT as their IDE
for their OS. QNX is in many high end car nav systems today.

Eclipse CDT is the basis for many embedded tool chains used by
firmware engineers, both in Linux and Windows.

Eclipse CDT may not have caught on as a host OS, host app development
IDE, but it is used extensively.

I have used it for over ten years now. It has had its limitations,
like no 'headless' builds, but that has been corrected.

Anyway thanks for the info. I was afraid that emacs and vi(m) would be
part of the response. :frowning: Don't use either at present.

Keith Smith

I’d second the mention of YouCompleteMe, which is an “IDE functionality” backend that works not only for emacs and vim, but also Sublime and Atom. It is growing more and more IDE’ish features; quick-fix support (using clang’s fixit hints) is the latest addition.

Hello Keith,

I'm from Oracle (previously from Sun Microsystems) and use NetBeans C++ IDE for developing Clang based tools.
Till 8.0 version Netbeans had own parser (as Eclipse). Starting from upcoming 8.1 NB is trying to use some clang components in experimental mode.

Vladimir.

Hello Keith,

I’m from Oracle (previously from Sun Microsystems) and use NetBeans C++ IDE for
developing Clang based tools.

Oh, this is awesome :slight_smile:

Till 8.0 version Netbeans had own parser (as Eclipse). Starting from upcoming
8.1 NB is trying to use some clang components in experimental mode.

Will this by any chance use the compilation database integration?

Hello Manuel,

I’ve demoed this to Argyrios Kyrtzidis ~year ago and he was impressed by it’s parsing speed :slight_smile: NB needed just 1 minute to parse whole LLVM+Clang 3.4 codebase on my laptop. Also I was complaining that migrating to i.e. Clang’s preprocessor makes us 2x slower (which is still the case for upcoming NB 8.1, but we trying to restore our speed) NetBeans for a long time has own “build interceptor”. It helps to put code bases with even really complex build systems into IDE. When developer uses Project with Existing Sources wizard and specify commands which he proceed in cmd shell, then IDE executes them and interpose compiler invocations to extract cwd and all flags passed to compiler. Then all is persisted in project properties, so user gain “Compile File” for free, because IDE for each file knows how it was compiled. For CMake based codebases json database is produced and used to extract flags. Am I answering your question? Or do you mean smth different? Vladimir.

Hello Manuel,

Hello Keith,

I’m from Oracle (previously from Sun Microsystems) and use NetBeans C++ IDE for
developing Clang based tools.

Oh, this is awesome :slight_smile:

I’ve demoed this to Argyrios Kyrtzidis ~year ago and he was impressed by it’s parsing speed :slight_smile:
NB needed just 1 minute to parse whole LLVM+Clang 3.4 codebase on my laptop.
Also I was complaining that migrating to i.e. Clang’s preprocessor makes us 2x slower (which is still the case for upcoming NB 8.1, but we trying to restore our speed)

Till 8.0 version Netbeans had own parser (as Eclipse). Starting from upcoming
8.1 NB is trying to use some clang components in experimental mode.

Will this by any chance use the compilation database integration?

NetBeans for a long time has own “build interceptor”. It helps to put code bases with even really complex build systems into IDE.
When developer uses Project with Existing Sources wizard and specify commands which he proceed in cmd shell, then IDE executes them and interpose compiler invocations to extract cwd and all flags passed to compiler.
Then all is persisted in project properties, so user gain “Compile File” for free, because IDE for each file knows how it was compiled.
For CMake based codebases json database is produced and used to extract flags.
Am I answering your question? Or do you mean smth different?

Let me rephrase: for example, YouCompleteMe supports using libclang & its compilation database interface to get the necessary compile flags for C++ files. Due to that support, I can take an arbitrary internal build system and add support for YCM by providing a libclang with a special implementation of the CompilationDatabase. Is that possible with NetBeans?

What you describe is the YCM approach how to help libclang to find compile flags to create correct TU. YCM should create implementation of CompilationDatabase and register it for libclang to see it (or generate compile_commands.json file) , right? But, from our experience the most difficult part here is: how to fill this CompilationDatabase content for arbitrary build system? I.e. for projects with alone my_favorite_buld_all.sh script? So, above I just shortly described how NB historically gets information about compiled flags. It is similar to scan-build. Possible what? :slight_smile: Possible to wrap flags gathered by scan-build-like interposer into CompilationDatabase for libclang usage? Yes it’s possible. But we don’t use libclang or Tooling APIs. I.e. we init Preprocessor manually, because have to disable all target build-ins and provide all our own settings for system paths, system macros and so one. Also we provide own FileSystem impl (great add-on in 3.6!!!), because we support Remote Development and real parsed files have to be treated in the environment emulating Remote Host. Vladimir.

Hello Manuel,

Hello Keith,

I’m from Oracle (previously from Sun Microsystems) and use NetBeans C++ IDE for
developing Clang based tools.

Oh, this is awesome :slight_smile:

I’ve demoed this to Argyrios Kyrtzidis ~year ago and he was impressed by it’s parsing speed :slight_smile:
NB needed just 1 minute to parse whole LLVM+Clang 3.4 codebase on my laptop.
Also I was complaining that migrating to i.e. Clang’s preprocessor makes us 2x slower (which is still the case for upcoming NB 8.1, but we trying to restore our speed)

Till 8.0 version Netbeans had own parser (as Eclipse). Starting from upcoming
8.1 NB is trying to use some clang components in experimental mode.

Will this by any chance use the compilation database integration?

NetBeans for a long time has own “build interceptor”. It helps to put code bases with even really complex build systems into IDE.
When developer uses Project with Existing Sources wizard and specify commands which he proceed in cmd shell, then IDE executes them and interpose compiler invocations to extract cwd and all flags passed to compiler.
Then all is persisted in project properties, so user gain “Compile File” for free, because IDE for each file knows how it was compiled.
For CMake based codebases json database is produced and used to extract flags.
Am I answering your question? Or do you mean smth different?

Let me rephrase: for example, YouCompleteMe supports using libclang & its compilation database interface to get the necessary compile flags for C++ files. Due to that support, I can take an arbitrary internal build system and add support for YCM by providing a libclang with a special implementation of the CompilationDatabase.

What you describe is the YCM approach how to help libclang to find compile flags to create correct TU.
YCM should create implementation of CompilationDatabase and register it for libclang to see it (or generate compile_commands.json file) , right?

No, the trick is that YCM doesn’t know about how to generate a compilation database - the build system integration knows (for example, CMake and ninja can generate the .json files, for our internal distributed build system (similar to bazel.io) we use a specific internal integration).

But, from our experience the most difficult part here is: how to fill this CompilationDatabase content for arbitrary build system?
I.e. for projects with alone my_favorite_buld_all.sh script?
So, above I just shortly described how NB historically gets information about compiled flags.
http://netbeans.org/kb/docs/cnd/quickstart.html#existingsourcesprojects
It is similar to scan-build.

Is that possible with NetBeans?

Possible what? :slight_smile:
Possible to wrap flags gathered by scan-build-like interposer into CompilationDatabase for libclang usage? Yes it’s possible.
But we don’t use libclang or Tooling APIs.
I.e. we init Preprocessor manually, because have to disable all target build-ins and provide all our own settings for system paths, system macros and so one.
Also we provide own FileSystem impl (great add-on in 3.6!!!), because we support Remote Development and real parsed files have to be treated in the environment emulating Remote Host.

Ah, is all of this open source? Are you planning to contribute it back to clang to make the tooling better?

I guess the answer to my questions is “no”, then - what I really want to do is be able to use the already existing integration we have for our internal build system with clang tools via the compilation-database to use NetBeans, but from what you say it seems like that’s not possible.

Cheers,
/Manuel

Then the most complex part (generate compilation db) is just provided for you. Great. yes, it’s in open source. There is no sense to contribute FS impl, because it wraps NB’s FileObjects into CLang’s Files. The answer to your original question “Will this by any chance use the compilation database integration?” is “no” Because we have all this information already. We don’t need clang for that task. We generate compilation database for any arbitrary complex systems by own mechanism. But we can read compile_commands.json format as well and use it to configure NetBeans (and in 8.1 we use it to init Clang classes). If “existing integration you have for your internal build system” can dump cmake-complaint compile_commands.json, then you can use NetBeans. If you are really interested in trying NB[1] then let’s exclude cfe-dev? Write me personally and I will try to advise how to configure/tune IDE for your project. I’m eager to do that, because we are very interested in user’s experience on big code bases. In fact we develop NetBeans as an IDE platform for Oracle Solaris Studio IDE where customers are dealing with really huge enterprise apps (recently I talked to customer successfully using Studio IDE for 50K Files/15MLoc C++ boost-intensive codebase) Thanks, Vladimir.

Hello Manuel,

Hello Keith,

I’m from Oracle (previously from Sun Microsystems) and use NetBeans C++ IDE for
developing Clang based tools.

Oh, this is awesome :slight_smile:

I’ve demoed this to Argyrios Kyrtzidis ~year ago and he was impressed by it’s parsing speed :slight_smile:
NB needed just 1 minute to parse whole LLVM+Clang 3.4 codebase on my laptop.
Also I was complaining that migrating to i.e. Clang’s preprocessor makes us 2x slower (which is still the case for upcoming NB 8.1, but we trying to restore our speed)

Till 8.0 version Netbeans had own parser (as Eclipse). Starting from upcoming
8.1 NB is trying to use some clang components in experimental mode.

Will this by any chance use the compilation database integration?

NetBeans for a long time has own “build interceptor”. It helps to put code bases with even really complex build systems into IDE.
When developer uses Project with Existing Sources wizard and specify commands which he proceed in cmd shell, then IDE executes them and interpose compiler invocations to extract cwd and all flags passed to compiler.
Then all is persisted in project properties, so user gain “Compile File” for free, because IDE for each file knows how it was compiled.
For CMake based codebases json database is produced and used to extract flags.
Am I answering your question? Or do you mean smth different?

Let me rephrase: for example, YouCompleteMe supports using libclang & its compilation database interface to get the necessary compile flags for C++ files. Due to that support, I can take an arbitrary internal build system and add support for YCM by providing a libclang with a special implementation of the CompilationDatabase.

What you describe is the YCM approach how to help libclang to find compile flags to create correct TU.
YCM should create implementation of CompilationDatabase and register it for libclang to see it (or generate compile_commands.json file) , right?

No, the trick is that YCM doesn’t know about how to generate a compilation database - the build system integration knows (for example, CMake and ninja can generate the .json files, for our internal distributed build system (similar to bazel.io) we use a specific internal integration).

Then the most complex part (generate compilation db) is just provided for you. Great.

But, from our experience the most difficult part here is: how to fill this CompilationDatabase content for arbitrary build system?
I.e. for projects with alone my_favorite_buld_all.sh script?
So, above I just shortly described how NB historically gets information about compiled flags.
http://netbeans.org/kb/docs/cnd/quickstart.html#existingsourcesprojects
It is similar to scan-build.

Is that possible with NetBeans?

Possible what? :slight_smile:
Possible to wrap flags gathered by scan-build-like interposer into CompilationDatabase for libclang usage? Yes it’s possible.
But we don’t use libclang or Tooling APIs.
I.e. we init Preprocessor manually, because have to disable all target build-ins and provide all our own settings for system paths, system macros and so one.
Also we provide own FileSystem impl (great add-on in 3.6!!!), because we support Remote Development and real parsed files have to be treated in the environment emulating Remote Host.

Ah, is all of this open source? Are you planning to contribute it back to clang to make the tooling better?

yes, it’s in open source. There is no sense to contribute FS impl, because it wraps NB’s FileObjects into CLang’s Files.
http://hg.netbeans.org/main/file/tip/cnd.apt/src/org/netbeans/modules/cnd/apt/impl/support/clank/ClankFileObjectBasedFileSystem.java

I guess the answer to my questions is “no”,

The answer to your original question

“Will this by any chance use the compilation database integration?”

is “no”
Because we have all this information already. We don’t need clang for that task.
We generate compilation database for any arbitrary complex systems by own mechanism.

Well, the problem is once you hit a single highly integrated codebase of > 100MLOC on networked file systems (meaning latency at least 1 order of magnitude higher than local disk) most of the IDEs I’ve tried fail miserably.

But we can read compile_commands.json format as well and use it to configure NetBeans (and in 8.1 we use it to init Clang classes).

If I put O(500k) files into it, many of which take 20-60 seconds to parse, what will happen?

then - what I really want to do is be able to use the already existing integration we have for our internal build system with clang tools via the compilation-database to use NetBeans, but from what you say it seems like that’s not possible.

If “existing integration you have for your internal build system” can dump cmake-complaint compile_commands.json, then you can use NetBeans.

See questions above.

If you are really interested in trying NB[1] then let’s exclude cfe-dev?

I’m interested in using NB, but I’d also first like to understand some of the engineering trade-offs you made - as the maintainer for our tooling infrastructure in clang, I’d like to get to a point where we get a lot of integration for free, instead of everybody needing to re-invent the wheel because we don’t meet the requirements.

Write me personally and I will try to advise how to configure/tune IDE for your project.
I’m eager to do that, because we are very interested in user’s experience on big code bases.
In fact we develop NetBeans as an IDE platform for Oracle Solaris Studio IDE where customers are dealing with really huge enterprise apps (recently I talked to customer successfully using Studio IDE for 50K Files/15MLoc C++ boost-intensive codebase)

Well, the problem I have is that I have:

  • a libclang / CompilationDatabase implementation that works for our internal codebase, but has rather non-standard latency (can have 1-2 minutes latency on first load of a file, if none of the files around have been touched yet)
  • it is basically impossible to get all compile commands for the whole codebase at once

The way people work around this when they use IDEs is that they generate a “view” of part of the codebase, but this takes considerable amount of time of effort to implement.

Cheers,
/Manuel

That’s why I’m also very interested in the try. I think it would be O(TIME): where TIME is #time find $SOURCE_ROOT -name “.h" -o -name ".cpp” -o -name “.c" | xargs cat | wc -l Btw, where have you got 20-60 seconds timing per compilation unit? From clang++? This is example for Mozilla code base: #export SOURCE_ROOT=/export/devarea/osprojects/mozilla-central #time find $SOURCE_ROOT -name ".h” -o -name “.cpp" -o -name ".c” | xargs cat | wc -l 8 050 831 real user 0m1.978s sys 0m4.635s This is the internal statistics printed by NetBeans: Compilation Units: 5587 === Stopping parser queue stopwatch mozilla-central (14745 files): 127953 ms Parsed 6521 KLines, Time seconds, Speed 50 KLines/second, Max Memory 5064 Mb This is on Solaris with 4cores x 4Gz machine with #netbeans -J-Xmx6G What we had to made as tradeoff: Parse headers “minimal amount of times” So, we have introduced smth like “chained PCHs” long time ago. It allows to reuse what was parsed in the context of one translation unit for parsing other translation units if “controling macro” for header check says “ok” to reuse (so, one header sometimes has several versions of PCH states) Of course I would recommend to run NB (being Java app) to allow big heap allocation, i.e. #netbeans -J-Xmx6G Thanks, Vladimir.