Eclipse CDT development C ++ slow solution
Eclipse/CDT is slow and memory usage is high. available solutions
I 've been tossing CDT for several hours tonight. I just thought a little bit about it. I just want to sum up my personal experience. please correct me. My environment is eclipse3.2.2, CDT 3.1.2,
JDK 1.5.0.10,
CDT has many performance/memory traps,
(1) Indexer. Some CDT functions require indexer (I don't know which functions need it, but some people say so)
After the CDT is installed, indexer is enabled by default. Today, I wrote a hello World Applet and ran it for more than a minute,
Close method: Right-click a project, choose Properties> C/C ++ indexer, and select no indexer. Or install the CDT plug-in on Windows> preferences-
> C/C ++-> indexer, select no indexer.
(2) CDT has a default option "follow # include's when parsing Working Copies", which is selected. When you open a source file, all the files included in the file
It must be parsed once. This affects the speed. After this option is disabled, the development speed of CDT is no different from that of Java. How to disable it: Windows> preferences> C/C ++>
Remove "follow.
(3) turning off the option mentioned in (2) may affect the smart insert function, that is, the automatic prompt function. CDT (at least in my environment) has a huge bug,
It is a common problem to parse include files. If the option (2) is selected, the parsing of many files is incomplete (you can find it from outline on the right ).
How is it parsed? Anyway, many header files in usr/include cannot be parsed successfully. The parsing is not successful, but the problem is that once you edit the source files that include these files
You entered ., ->, or:, hahaha, wait for at least five minutes before the result is returned. Then, your memory consumption will increase by more than MB, wait again,
Memory leakage again. Someone on Google asked, How does CDT occupy 1 GB of memory? There is another problem with selecting (2) that option, that is, generic Parsing is not available. Turn off the option in (2,
You will find that the source file parsing in outline is completely correct. However, memory leakage still occurs. In this case, you need to disable auto activation. No problem after it is turned off, but no
Automatically prompts/completes member items. Turn off the function: choose windows> preferences> C/C ++> editor> code assist, and remove the check boxes in the three boxes of auto activation.
In this way, the performance is almost the same as that of jdt. The cost is that you cannot use automatic prompts/complete the basic functions of this modern IDE. However, compared with other ides in Linux,
Eclipse/CDT is much easier to use on the interface. For example, the UI is user-friendly, the code reading, the code template, and the Integration with SVN/CVS. At this time, I like the CDT.
Finally, let's look at the following:
Eclipse bookstores have one sentence: Eclipse reverses Java. As a matter of fact, even immature CDTs have lost many people in Java. Similarly, I used. Net/C # in the past.
People who hate C ++ are fond of Java and C ++ development because of eclipse and its ease-of-use design and related culture, he can feel the charm of Poetry in programming.