Saturday, October 08, 2005

Eclipse CDT 3.0 test drive

I have used CDT 2.0 before and I felt it was not ready for big projects. Now the new CDT 3.0 has been out for a while. I already saw several reviews online talking about it. One of them is from Robert O'Callahan. He was trying to use CDT 3.0 against Mozilla code base. He mentioned that he actually managed to index most of the Mozilla and get code complete work. This is impressive considering the fact that Mozilla code base has more than 6000 C/C++ files.

It's very common for enterprise developers to analyze big legacy code. The ability to index big code base will save developer tons of time to understand legacy code. LXR, ctags and cscope can do an ok job on this, but the index result from these tools are far from prefect. So I want to try CDT 3.0 by myself and see how good it is.

My working environment:
  • OS: Fedora Core 4, kernel 2.6.13
  • CPU: P4 3.0 G
  • RAM: 1.5 G
  • CC: GCC 4.0.1-5
  • Eclipse: 3.1 with CDT 3.0
I decided to test CDT against firebird database code base. I checked out firebird 2 folder from sourceforge cvs server using Eclipse's cvs perspective, and imported it as a c++ project. CDT automatically started indexing after the creation of the project. There are about 2000 files under the firebird 2 folder, so the initial indexing process was really slow. After a while, CDT seemed stop indexing when the indexing is 40% done. Every time I went back to check the indexing status, the progress bar always told me it was 40% done. Well, it looked like Eclipse needed more memory to get this work done. So I closed Eclipse and changed the maxim heap size for Eclipse to 1G. After this change, CDT did successfully index firebird project.

I tried searching declaration, definition and reference, the speed was pretty good. Refactoring is a little bit weak. Only "rename" is available.

keep tuned. :)

0 Comments:

Post a Comment

<< Home