Community
Participate
Working Groups
Build Identifier: I20100608-0911 I am working with a codebase of 100K+ files (A similarly sized code base that may facilitate reproducibility would be something like the linux kernel). Recently, I've setup up an environment to navigate the code in CDT 7.0 in Eclipse 3.6. I linked all of the code under a single Makefile project, and then I built an index on the project. While the indexer was running, I found this link that describes the indexing options: http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg10390.html. The indexer took about an hour or two to finish, and ever since I've been repeating the following procedure: 1. Open "C/C++ Index" View, right click project, click "Count Symbols". This takes about 5-10 min to complete. 2. In "C/C++ Index" View, right click project, click "Index" -> "Freshen All Files". This takes about an hour or so to complete. Each time I freshen the index, my symbol count increases substantially. I've done over 10 refreshes now, and it is still growing at about a linear rate upon each refresh, giving no indication that it will eventually stop growing. My index is now over 1GB in size, whereas the initial index creation resulted in about 500MB, and each successive refresh adds about 50-150MB in size. I've also noticed that after some refreshes, for example, my "symbols" count will go up but my "declarations" and/or "definitions" count will go down. My indexing preferences are specified as follows: (CHECKED) "Enable Indexer" (CHECKED) "Index source files not included in the build" (CHECKED) "Index unused headers" (CHECKED) "Allow heuristic resolution of includes" "Skip files larger than [9999] MB" (unchecked) "Skip all references" (unchecked) "Skip implicit references" (unchecked) "Skip type and macro references" (CHECKED) "Automatically update the index" (CHECKED) "Update index immediately after every file-save" (SELECTED) "Use the build config specified in project's indexer settings" "Limit relative to the maximum heap size: [25] %" "Absolute <database cache> limit [1000] MB" "Absolute <header file cache> limit [1000] MB" Reproducible: Always Steps to Reproduce: See description
Thanks, I will try to reproduce this with a simple project. As a workaround you can use 'Rebuild Index' rather than 'Freshen All Files'. Also note that keeping the 'C/C++ Index View' open can substantially slow down indexing.
Created attachment 174879 [details] fix I found one major (macro definitions) and two minor leaks (file names, ctor of anonymous classes). With the projects I have tested with the index no longer grows beyond a certain limit.
Fixed in 7.0.1 and 8.0 > 20100721.
*** cdt cvs genie on behalf of mschorn *** Bug 320426: Index grows when updating files. [*] PDOMMacro.java 1.28.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMMacro.java?root=Tools_Project&r1=1.28&r2=1.28.2.1 [*] PDOMFile.java 1.60.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java?root=Tools_Project&r1=1.60&r2=1.60.2.1 [*] PDOMASTAdapter.java 1.28.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMASTAdapter.java?root=Tools_Project&r1=1.28&r2=1.28.2.1 [*] PDOMMacro.java 1.29 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMMacro.java?root=Tools_Project&r1=1.28&r2=1.29 [*] PDOMFile.java 1.62 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java?root=Tools_Project&r1=1.61&r2=1.62 [*] PDOMASTAdapter.java 1.29 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMASTAdapter.java?root=Tools_Project&r1=1.28&r2=1.29