Does class commentary slow the eclipse?

Asked

Viewed 61 times

1

I have an old project, whose size is 225Mb, where most classes have the whole body commented. In the past I did not use code versioning in my company and the versioning was done in the code itself, commenting on a line and writing the change in the line below. Example:

==> 2019-07-09 the code was:

System.out.println ("Hello World 1");

==> 2019-07-10 the code was:

//System.out.println("Olá Mundo 1 ");
System.out.println ("Hello World 2");

==> 2019-07-11 the code was:

//System.out.println("Olá Mundo 1 ");
//System.out.println ("Hello World 2");
System.out.println ("Hello World 3");

Now imagine this for over 2000 classes, where there are several large blocks of commented code.

All these classes can cause slowness in the Eclipse?

Because when I open this project Eclipse is very slow?

  • Yes, absolutely, the eclispe is an IDE and runs checks analyzing the text and the longer the text the longer the execution time and so appears the slowness to which it refers. Operations are being made in the background, which causes the editing program to slow down.

  • Is there any eclipse profile where it is possible to present these bottlenecks ?

  • 1

    @Igormoisés as it is not a question of the program being developed, you need to use a profiler direct on Eclipse. Maybe Visualvm can pick it up, but I don’t know how useful it will be for you, nor whether the information will be readable.

1 answer

2


I will not state categorically, but it does not cause anything very significant, at least it should be something very small and imperceptible.

I know Eclipse does a lot of analysis while you’re coding and it costs, the more text to analyze the slower it gets, but it’s not to change much, the bulk of the time spent on analysis is done on much more relevant things, o Comments tab will only spend time on scanner and I imagine having optimizations to avoid repetition where you shouldn’t, so you shouldn’t worry about that.

I would pass the versioning data elsewhere and remove it to clean the code with things that shouldn’t be there, should give a slight gain (very slight, I don’t know if you’ll notice) but the reason to do this should not be the performance.

Old codes shouldn’t be on the official code base, take this out too.

Eclipse is slow and this is noticeable the more code you have. The bigger damage is by analyzing the code itself and not the comments. Eclipse has a bad and outdated architecture, is famous for being slow and gives bad fame to Java that once was slow but today is not more. Most of the slowdowns found in Java programs are the fault of the program and not Java, it’s a lot of people with a "Nterprise code" mentality sticking a lot of unnecessary swinging around in the name of "good practices" that they don’t understand.

  • The situation is that this legacy code has already been put into a versioning system. What happens is that it went up the way it did. With large blocks of commented code within the numerous classes. What other tools for java development are currently available ?

  • 1

    @Igormoisés erases and ignores

  • Jetbrains Intellij

  • Thank you noble colleagues! I will propose the changes!

  • Remembering that Intellij is paid for, and the community version does not provide multiple services

Browser other questions tagged

You are not signed in. Login or sign up in order to post.