| Summary: | Eclipse getting slower and slower, UI freeze for some seconds and then resume | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | stibbons <gaetan> | ||||
| Component: | cdt-editor | Assignee: | cdt-build-inbox <cdt-build-inbox> | ||||
| Status: | RESOLVED DUPLICATE | QA Contact: | Andrew Gvozdev <angvoz.dev> | ||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | cdtdoug, remy.suen, yevshif | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
stibbons
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. |