Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » So I've updated to 2019-12...(You can call it a rant)
So I've updated to 2019-12... [message #1826297] Thu, 23 April 2020 06:13 Go to next message
Stanislav Vorobiov is currently offline Stanislav VorobiovFriend
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 Go to previous messageGo to next message
David VavraFriend
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 #1826473 is a reply to message #1826342] Sat, 25 April 2020 14:35 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
Then submit a bug report.

I did and it is all fixed now.

( This has been posted to show that writing superfluous replies is not a privilege limited to some )
Re: So I've updated to 2019-12... [message #1826501 is a reply to message #1826473] Sat, 25 April 2020 23:05 Go to previous messageGo to next message
David VavraFriend
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 #1827451 is a reply to message #1826501] Thu, 14 May 2020 17:54 Go to previous messageGo to next message
Larry Hobbs is currently offline Larry HobbsFriend
Messages: 2
Registered: May 2020
Junior Member
Yeah, As said previously the problem doesn't seem to be with Eclipse. It will be better if you could submit a Bug report s suggested!
Re: So I've updated to 2019-12... [message #1827811 is a reply to message #1826297] Sun, 24 May 2020 18:37 Go to previous messageGo to next message
Aleksander Nowak is currently offline Aleksander NowakFriend
Messages: 3
Registered: May 2020
Junior Member
Hi, try to increase the heap size. Open the eclipse.ini-File and replace the -Xmx2G-Setting with -Xmx6G or more.

Cheers
Re: So I've updated to 2019-12... [message #1828228 is a reply to message #1827811] Thu, 04 June 2020 12:46 Go to previous messageGo to next message
Stanislav Vorobiov is currently offline Stanislav VorobiovFriend
Messages: 5
Registered: April 2020
Junior Member
Well, I've already tried increasing mem, that doesn't help. I've made a video of those terrible lags during selection, i.e. I'm not even typing any code here:

https://www.youtube.com/watch?v=Wd6a68SHe18

After restart it all works fine until I make a few changes and re-compile a couple of times, then it all starts lagging again. I'm sure it's not my environment setup, I've created everything from scratch. I've also tried playing around with simpler projects and it's all the same, like
it works nice at start, but after you actually write code here and there and compile a couple of times it starts lagging like this...
Re: So I've updated to 2019-12... [message #1828234 is a reply to message #1828228] Thu, 04 June 2020 14:34 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Heap usage is increasing as the selection size grows.
Jumped to nearly full at one point.
The delay could be caused by swapping.
Try opening only one file and see it gets better.

Eclipse memory usage is extravagant.
I often have 20 files open at once and the system memory usage goes to 90%
but then I also have Chrome running with a bunch of open tabs.

Running the garbage collector might help.
When I did this the shown heap usage went from 2.1G/2.6G to 223M/308M although total system usage didn't change.

This usage could be the JVM and not Eclipse.
If so, not much can be done to fix it.
Re: So I've updated to 2019-12... [message #1828257 is a reply to message #1828234] Fri, 05 June 2020 07:03 Go to previous messageGo to next message
Stanislav Vorobiov is currently offline Stanislav VorobiovFriend
Messages: 5
Registered: April 2020
Junior Member
Well, I changed mem limit from 2G to 4G like this: -vmargs -Xmx4096m
And it got better and now I see that eclipse actually uses it all, here's 'top' output:
--- 10,061g 4,549g --- java
10G virtual mem, 4.5 gigs actually allocated... Simply insane, 4.5 gigs for a text editor...
Re: So I've updated to 2019-12... [message #1828274 is a reply to message #1828257] Fri, 05 June 2020 11:36 Go to previous messageGo to next message
Stanislav Vorobiov is currently offline Stanislav VorobiovFriend
Messages: 5
Registered: April 2020
Junior Member
So, half of a day passed and now I get these lags again... So setting 4G helped, but not for long. Actual memory usage is 3.7G according to 'top'.
I really can't set more than 4G, I have other stuff running that needs mem as well.
Re: So I've updated to 2019-12... [message #1828323 is a reply to message #1826297] Sun, 07 June 2020 15:04 Go to previous messageGo to next message
Aleksander Nowak is currently offline Aleksander NowakFriend
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 #1828388 is a reply to message #1828323] Tue, 09 June 2020 05:07 Go to previous messageGo to next message
Stanislav Vorobiov is currently offline Stanislav VorobiovFriend
Messages: 5
Registered: April 2020
Junior Member
Hi. I've tried -XX:+UseParallelOldGC, I think it got better. I've also set mem limit to 3G, even 4G is way too high for me, I have total 12G on my system and there's stuff going on besides eclipse.
So for now -XX:+UseParallelOldGC + -Xmx3072m is the way to go, I'm still getting lags sometimes, but I can live with it :)
Thanks!
Re: So I've updated to 2019-12... [message #1828543 is a reply to message #1828388] Thu, 11 June 2020 16:58 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
OT !
" is not really caused by Eclipse, it is caused by Java"

So "who is on first?"
Is OS GOING TO BE next to blame ?

Very reluctantly - I have submitter a bug.
The "replay " I received
" this is not platform but IDE problem..."

Take a look at "submit bug " options
"Eclipse platform' or
"Eclipse CDT".

So my bug was passed to CDT.
Needless to say - the bug is still there and no further notifications was received.

I fully expect next to be told that "these are volunteers... "

SO PLEASE DON'T BOTHER REPLYING

Re: So I've updated to 2019-12... [message #1828575 is a reply to message #1828543] Fri, 12 June 2020 17:02 Go to previous message
Aleksander Nowak is currently offline Aleksander NowakFriend
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

Previous Topic:float type works with Keil but not with Eclipse
Next Topic:Where are the Include Settings now???
Goto Forum:
  


Current Time: Thu Apr 25 13:00:15 GMT 2024

Powered by FUDForum. Page generated in 0.03274 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top