Community
Participate
Working Groups
Build Identifier: 20110615-0604 I'd like to report a bug dealing with the usability of CDT. After a while on my main project, the UI starts to slow down, refresh takes more and more minutes and at the end, I have to restart the complete workspace. I don't know what it is doing, there is no indication in the progress view. Sometime, it start refreshing so I have "refreshing file" appearing. It can take some times but it is not the problem here, the UI keep on being responsive. The refresh setting in the workspace is NOT to use "hooks and pooling" (the checkbox is unchecked in the workspace settings). There is also no automatic build, and I've removed linux dev help plugin that was really slowing down the UI. The C++ project has a very large number of files (> 2000 cpp files), with includes from external projects, libraries, etc. But I don't think it a HUGE C++ project. Just a mature project that I'm working on from years. Once started, Eclipse works pretty well. For unknown reason, some C++ files refuse to get indexed (on the same directory, some are indexed, the other are not). I've checked I've not put exclusion in the project indexer settings. But anyway, it just work pretty well. After a while (15 min, 30 min), some debugging, rebuild (start a external build script), etc, I see eclipse becoming less and less responsive, without doing something special (not opening a large file, no Ctrl+Tab'ing,... The cursor blinks like something is being refreshed, but no information of WHAT is blocking everything. I have checked the "Show heap status" checkbox, so I can see the memory becoming full (371M or 371M). Eclipse or one of its plugin is indeed doing something, but how to know what it is doing? Nothing in the "Progress view". Even a nice kill doesn't do the job, and I cannot know How can I disable pluging one by one ? I can only uninstall them in the plugin page, but no "disable" stuff. I don't know if it is mylyn, cvs plugin, log viewer, etc or the core cdt plugin that does this annoying behavior. My question : I have a bunch of plugin installed. How can I know which plugin it doing something? Maybe one is dealing with a big job and prevent the main UI thread to work. I also found that the CPU usage is 100%, but only on one core (so on my 4 cores system, it is stuck at 25%). This means this is only one thread that is doing a big job, and of course it is the main UI thread. I have nothing against plugins doing lot of jobs, but why doing this in the main thread? It should be done in another thread, and keeping the main one completly responsive. I cannot pass any day without restarting eclipse at LEAST 20 times. It's very time consuming. Reproducible: Always Steps to Reproduce: Easy to reproduce on my setup. But I cannot share the projects. It's a set of several C++ projects. The main project is the only one to carry build script (I use a custom build command, no makefile generation, etc. Build itself works get, but it is the C++ editors that really ends up being unusable after 1h or 2h
Actually, what I want to know is how a "big job" can hangs the complete UI. Why not just do this "job" in another thread, and do everything to avoid at all cost doing anything in the main UI loop (this is at the very bases of MVC programming !)
(In reply to comment #0) > I'd like to report a bug dealing with the usability of CDT. CDT bugs go to CDT.
Other thing : when I do a "Index > Freshen all file" or "Rebuild Index", it starts refreshing, and the UI is becoming less and less responsive. And then it freezes the complete UI. I can see the process using the complete CPU (one core at 100%) and it goes back to normal when the refresh is finished. Why the %$*! is the UI freezing on a simple refresh? How can I know which part of eclipse is impacted (CDT, plugin, core,... )?
Created attachment 204082 [details] Eclipse Hang Thread Dump Please find attached the thread dump during one such annoying hangs. Any advice?
(In reply to comment #0) > The C++ project has a very large number of files (> 2000 cpp files), with includes from external projects, libraries, etc. > But I don't think it a HUGE C++ project. Just a mature project that I'm working on from years. I am dealing with C/C++ projects having ~30000 files and do not experience issues you are describing. Did you try increasing memory in eclipse.ini file? For example, I am using following: --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Xms40m -Xmx666m CDT is not known for leaking memory, but it does not work stable when memory is not enough. If one (or more) of the the bunch of plugins you installed is leaking memory that could cause CDT indexer to choke. Try a separate eclipse installation with only eclipse platform and CDT installed on it. Give enough memory in eclipse.ini and try to work intensively with CDT for a day or more. Does it still have those issues?
Did you try the suggestions from the last comment?
Yes, sorry for the delay. I've increased these value (up to 1Gb), and indeed, it more stable. At least I can work. However, I still get the UI locked for some dozen of second during some "refresh" (after builds, cvs merges, ...), and that's also annoying. And moreover, if I do a Ctrl+Space without any word started (it should display a very long list), in this case I have enough time to take one or two coffee. It usually stops for more than 2 minutes (on a quad core cpu). The Heap display is (now) usually around 700/990M, which is also huge ! I think there is room for improvement. For information, my workspace holds 14 C++ projects, connected in CVS. Most of them has a few dozen of c++ files, and one is really huge (more than 3000 C++ files and headers). When I perform a full refresh of the index, it displays that it's refreshing more than 16000 files (with dependencies : qt/boost/gsoap/other lib...). I have limited the parsing of .c and .cpp files in the "deps" directory (which is dir which hold a symlinks to all external C++ libraries we use). I must admit I'm a bit addicted to eclipse, its completion system works pretty well, even it is quite slow, and the "call hierarchy" is a huge bonus, and the gdb integration. But the fact it just block everytime i'm doing something is really annoying and time consuming. I cannot advoquate the use of eclipse due to this point + memory consumption which is really huge. These two point should really be taken account and really improved, to my opinion.
Well, C++ is complicated language and it takes computational power to reindex thousands of files. You shouldn't expect it to be faster than recompiling these files with a compiler. As far as refresh problem, you can set up your refresh policy in project properties->C/C++ Build->[Refresh Policy] tab. That was added in Indigo release. So I suppose the problem of blocking on autocompletion is left. It is a real problem and it has been reported in bug 126698. You can join others in voting for that bug. *** This bug has been marked as a duplicate of bug 126698 ***
Hello. I still have strange feeling about eclipse CDT. On my main project, it still take huge memory (>800 Mb in the Heap status), and sometime it hangs for a few seconds. I think there are several cases when annoying "freeze" happens : - Normal refresh : refresh is performed and displayed in the "progress view". It normaly doesn't hang the IDE, but sometime we can feel some slowness. - "Wierd refresh" : the UI freeze, and the mouse cursor keep on changing from "wait" cursor to normal, back and forth for a minute or two. I think this is related to the CVS plugin (occurs most of the time when I cvs edit a file, or just after I entered my main password). - "Complete freeze" : the UI is completly frozen for unknown reason (nothing in the "progress view") for a minute or two. On our hour of work, this happens 4 or 5 times. - slow display of the completion when Ctrl+Spacing on a new line (should display a huge list, but there is no reason why this takes too long). - when I start typing a variable name where Ctrl+Space should complete easily or display the 2 or 3 possiblity, it take ~1s to show... I mean, I'm on a quad core machine, this is not normal for this to take so long ! These freeze happens so often that I'm use to them, but they also happens systematically when colleegues are around me, leading to "ah, eclipse is still hanging, i keep my old vi". I also must admit I see more and more people around me with QT creator, and it's damn fast at autocompletion and stuff like this. It is not normal a simple eclipse instance to take more than 500 Mb of memory when it is launched. Thanks.