So I've updated to 2019-12... [message #1826297] |
Thu, 23 April 2020 06:13 |
Stanislav Vorobiov Messages: 5 Registered: April 2020 |
Junior Member |
|
|
I don't know why I'm writing this at all, I've never written such posts in a long time, but I'm really pissed. I'm a C++ developer and I always liked eclipsed, I liked the idea behind it, but the performance... Well, I was using 2014 version before and it had performance issues, recently I've updated to 2019-12 and it's all the same and sometimes even worse. To put it shortly, whenever I type something eclipse starts to eat a lot of cpu, 400%+ (I have 8 cores with hyperthreading) for a short time and then stops, well, it wouldn't be a problem if it was some background task, but I get stuttering in my editor, it's very annoying, feels like crap. I had this problem in 2014 version and now I though like, hey, 5 years have passed, they probably fixed it... nope :(
The thing is this doesn't happen all the time, like 70% of the time it's ok, but when this happens I'm forced to restart my IDE. My C++ project is quite big, a lot of source and header files, third-party libs, templates, macros, etc. but hey, this is a real project, I do understand that eclipse would work fine on "hello world" like stuff, but I'm not working on "hello world", I'm working on real stuff here. So I don't know what to do, I'm writing this now because I was forced to restart my IDE again, 2nd time this morning... I'm thinking about switching to QtCreator or m.b. try CLion... I want to use eclipse, I really do, but I'm so tired of this performance crap...
|
|
|
Re: So I've updated to 2019-12... [message #1826342 is a reply to message #1826297] |
Thu, 23 April 2020 17:36 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
I suspect you have a configuration problem.
Particularly since it's been occurring since 2014.
Is anything else running?
There is a Progress view that shows the running tasks.
Try to document when it occurs and the surrounding particulars.
Then submit a bug report.
Things to consider:
- There's a lot going on at initial startup.
The display looks ready but Eclipse isn't.
- I get random lockups but only in the StatEt R editor.
It occasionally goes into a tight loop.
Don't know why yet and requires a restart.
Rants may be satisfying but until you can reliably recreate the problem it likely won't get fixed.
[Updated on: Fri, 24 April 2020 02:00] Report message to a moderator
|
|
|
|
Re: So I've updated to 2019-12... [message #1826501 is a reply to message #1826473] |
Sat, 25 April 2020 23:05 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Quote:Then submit a bug report.
I did and it is all fixed now.
The purpose of a bug report is to document a problem (preferably in a searchable, centralized database) so that it CAN be fixed. The clearer the description of the issue and surrounding circumstances the more likely the issue will get addressed and fixed. Intermittent failures or one-of-a-kind are almost impossible to solve so the effort is concentrated on issues that are reproducible. Vague descriptions of an issue are, more often than not, useless.
Eclipse bug reports are maintained using Bugzilla at https://bugs.eclipse.org/bugs/
Fixes go into the future releases. It's unlikely that a fix of a single issue will result in a new release.
Not filing a bug report essentially implies the issue is of little or no concern.
[Updated on: Sun, 26 April 2020 04:53] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: So I've updated to 2019-12... [message #1828323 is a reply to message #1826297] |
Sun, 07 June 2020 15:04 |
Aleksander Nowak Messages: 3 Registered: May 2020 |
Junior Member |
|
|
Hi, the high memory consumption is not really caused by Eclipse, it is caused by Java. Another cause is garbage collection. You need up to 5 times more memory than the application really needs for optimal performance.
And if the -Xmx4096m setting helped a lot then try -Xmx8192m.
You could also try an other garbage collection strategy. Eclipse uses the G1 garbage collector out of the box. It has short pause times but it needs lots of CPU ressources. And i have also noticed a strange performance degradation over time when i used this collector in a JavaEE application. So i switched to the parallel garbage collector and the problems went away.
If you want to use the parallel collector then replace the -XX:+UseG1GC setting with -XX:+UseParallelOldGC in the eclipse.ini file.
Cheers
[Updated on: Sun, 07 June 2020 16:56] Report message to a moderator
|
|
|
|
|
Re: So I've updated to 2019-12... [message #1828575 is a reply to message #1828543] |
Fri, 12 June 2020 17:02 |
Aleksander Nowak Messages: 3 Registered: May 2020 |
Junior Member |
|
|
Hi,
the point why it is caused by Java is how strings are implemented in Java. In Java strings are immutable. Every time you believe that you modify a string a new string with the modified content will be created.
If you have following code:
String myString = "myJavaString";
myString = myString + "another String" + "one more String";
This code will be translated to something like that:
String myString = "myJavaString";
myString = new StringBuilder(myString).append("anotherString").append("one more String").toString();
Working with strings in Java creates lots of short living temporary objects and they produce pressure on the garbage collector. And unfortunately strings are the most important data type für source code. :) So you cannot avoid them. There are some strategies like string interning that can partially minimize the memory hunger of strings but they have other disadvantages.
The second point is, you need up to five times more heap memory than your application really needs to get good performance:
Here is a study:
https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
This two points are the main reason why increasing the heap memory size helped so much.
The third reason is, the G1 collector s*cks. Switching to the parallel collector helped also.
Personally i prefer the OpenJ9 vm over Hotspot. This vm needs ~30% less memory and the gencon garbage collector is better for most scenarios, IMHO, but YMMV.
Cheers
[Updated on: Sat, 13 June 2020 10:48] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03274 seconds