Bug 578595 - Poor performance
Summary: Poor performance
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2022-02-05 04:18 EST by h m CLA
Modified: 2022-03-29 04:02 EDT (History)
4 users (show)

See Also:


Attachments
UI freezes: simple coding, autocompletion (48.27 KB, image/jpeg)
2022-03-04 15:18 EST, h m CLA
no flags Details
UI freezes autocompletion (13.62 KB, image/jpeg)
2022-03-21 22:39 EDT, h m CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description h m CLA 2022-02-05 04:18:07 EST
Eclipse has poor performance, I noticed when you close some procjets it can get faster, but still poort.
Comment 1 Jeff Johnston CLA 2022-03-04 11:11:53 EST
Please be more specific about what projects you have open, what delays are you seeing (waiting to build, UI freezes?).  There are a number of bugs open for specific issues (e.g. parallelizing completion) and in general work is always underway to improve performance.  You have opened this against 4.23 which is the next release which is not yet final.  Are you actually using a milestone build or do you have an older version?
Comment 2 h m CLA 2022-03-04 11:22:54 EST
Version: 2021-12 (4.22.0)
Build id: 20211202-1639

Everything in Eclipse has bad performance.
Comment 3 Jeff Johnston CLA 2022-03-04 11:47:16 EST
I'm sorry you feel that way.  I use Eclipse every day and it works well on my machine to develop Eclipse itself which has a large code base.  Perhaps your set-up is insufficient to run Eclipse properly.  Without specifics, there is no way to narrow down the issue and help you with your problem.
Comment 4 h m CLA 2022-03-04 11:55:13 EST
What specifics do you want? I didn't observe any part that works flawless.
Comment 5 Jeff Johnston CLA 2022-03-04 13:20:40 EST
(In reply to h m from comment #4)
> What specifics do you want? I didn't observe any part that works flawless.

Check the error log: Window->Show View->Error Log

Perhaps you are getting exceptions or warnings that are the cause of the slow down.

Under Window->Preferences->General->UI Freeze Monitoring you can elect to log UI freezes and tweak the limits for monitoring.  Are there any UI freezes being reported in the log?

Provide your machine specifics.   What Eclipse features do you have installed? (see Help->About Eclipse IDE->Installation Details->Installed Software).  Sometimes third party plug-ins can slow Eclipse down.

There are always bug fixes being made.  Try the latest 4.23 release RC1 which is close to being released:

  https://www.eclipse.org/downloads/packages/release/2022-03/rc1

Are any of the issues you are noticing better with the latest release?

If you are working on a public project, provide the project repo info.  If you are noticing lags in specific areas, provide scenarios for the most notable delays (e.g. build time, opening file for first time, lags in the editor, content assist).
Comment 6 h m CLA 2022-03-04 15:18:55 EST
Created attachment 288165 [details]
UI freezes: simple coding, autocompletion
Comment 7 h m CLA 2022-03-04 15:23:10 EST
In this window I have only warnings/errors from the update that I did today.

About bug fixes. When I updated couple months ago it was way worse than on earlier verions. I have other issues opened as I remember.

Is there a way to switch to this version without reinstalling?
Comment 8 Andrey Loskutov CLA 2022-03-04 16:02:24 EST
(In reply to h m from comment #6)
> Created attachment 288165 [details]
> UI freezes: simple coding, autocompletion

Instead of the screenshot, please attach the actual log file. Error log view -> export.
Comment 9 Jeff Johnston CLA 2022-03-04 16:56:04 EST
(In reply to h m from comment #7)
> In this window I have only warnings/errors from the update that I did today.
> 
> About bug fixes. When I updated couple months ago it was way worse than on
> earlier verions. I have other issues opened as I remember.
> 
> Is there a way to switch to this version without reinstalling?

The RC1 version site I pointed you to has complete Eclipse packages you can download without affecting your current install so you can try it out and compare.

If you try the new version and feel it solves any of your issues, you can update your current install by adding:

https://download.eclipse.org/releases/2022-03

as a software site in Window->Preferences->Install/Update->Available Software Sites then do a Help->Check For Updates

Note this will overwrite your current installation and will update any simrel components you have installed as well (e.g. CDT C/C++ components).
Comment 10 h m CLA 2022-03-04 19:16:52 EST
Logs, files, I can share in private, I don't know if they will be open to public.
Comment 11 Rolf Theunissen CLA 2022-03-08 03:00:57 EST
Platform: Windows 10

Are you using Windows Defender? General performance issues are known to be caused by this, like any other Java process.

See the note in the New and Noteworthy, which also includes a workaround.

https://www.eclipse.org/eclipse/news/4.23/
Comment 12 h m CLA 2022-03-08 08:59:09 EST
I was using it, yes.
Comment 13 Rolf Theunissen CLA 2022-03-08 09:00:18 EST

*** This bug has been marked as a duplicate of bug 548443 ***
Comment 14 h m CLA 2022-03-08 09:01:48 EST
Who said there are no problems without windows defender?
Comment 15 h m CLA 2022-03-08 09:01:56 EST
Who said there are no problems without windows defender?
Comment 16 Rolf Theunissen CLA 2022-03-08 10:09:56 EST
(In reply to h m from comment #15)
> Who said there are no problems without windows defender?

If you ruled out that Windows Defender is not cause the issues in your case, then you should have clearly stated that the problems persisted. Sorry for the misunderstanding.

But, please provide additional details on the performance issues you observer, e.g., the stack traces of the UI freeze Monitoring. Without additional information there is nothing we can do.

As you are reporting general performance issues, not related to specific actions you do, it is safe to assume that this is caused by Windows Defender or something else in your environment. 
Please try to rule out other sources of slowdown:
- Apply workarounds to exclude Eclipse from Windows Defender.
- Ensure that no other processes are using resources that could slow down Eclipse, e.g. other processes that heavily use the processor. For example, from personal experience, Microsoft Teams can slow down Eclipse by 50%.
- Ensure that your PC does runs at its maximal performance, and it is not slowed down to safe battery power.

There are many other users on Windows that do not experience the issues you observe. Somehow it should become clear what is special in your environment or in how you use Eclipse.
Comment 17 Rolf Theunissen CLA 2022-03-10 02:44:58 EST
Final request for additional data. The project is happy to look into any performance issues, in fact, there has been a lot of focus on performance lately.
However, without specifics about your issue there is nothing that the project can do. That is, we cannot reproduce your issue, let alone, we cannot diagnose the issue and verify if your issue is gone after a change.

Note that the requested stack-traces would not include any sensitive data, and you can anonymize parts that you don't like to share. Attached files will be public, but that is the nature of an opensource project.

If you need to keep things private, consider hiring somebody or company to fix the issue for you. In that way you can agree on a SLA that includes privacy.
Comment 18 Rolf Theunissen CLA 2022-03-19 07:10:36 EDT
Without additional information, this bug cannot be analyzed or solved.
Comment 19 h m CLA 2022-03-19 14:03:30 EDT
Opening project that is not closed for example.
Comment 20 h m CLA 2022-03-19 14:04:25 EDT
After disabling defender of course its way better, but I still notice some slow working.
Comment 21 Thomas Wolf CLA 2022-03-19 15:22:53 EDT
Without precise descriptions and precise steps to reproduce a particular performance problem there is nothing we could do.

I also note that the screenshot attached shows some "UI freezes" of 0.06 sec. That is nonsense. Go to Preferences->General->UI Freeze Monitoring and set the "Warning threshold (ms)" to a sane value like 500. Nobody cares about a UI delay of 50-60ms. Half a second, i.e., 500 milliseconds, is a much more reasonable value.

Also set "Error threshold (ms)" to some value >= "Warning threshold (ms)". A good default value is 1000 (i.e., 1 second).
Comment 22 h m CLA 2022-03-21 22:39:07 EDT
Created attachment 288262 [details]
UI freezes autocompletion

Everytime I try to autocomplete UI freezes. It's not like oh it's just 0.11 seconds, it's really laggy.
Comment 23 Thomas Wolf CLA 2022-03-22 02:51:42 EDT
Of course your Eclipse is laggy if you have such low UI freeze monitoring thresholds. Increase them.
Comment 24 Rolf Theunissen CLA 2022-03-22 04:29:43 EDT
(In reply to h m from comment #22)
> Created attachment 288262 [details]
> UI freezes autocompletion
> 
> Everytime I try to autocomplete UI freezes. It's not like oh it's just 0.11
> seconds, it's really laggy.

UI freezes are when the UI becomes completely irresponsible. 0.11 seconds is on the boundary of what is being responsible, so yes it is not really snappy but cannot call this real UI freezes.

If you like to get any more feedback, attach the stack traces of the UI monitoring. Without that we only know that there are very small freezes, but we cannot analyze where the come from, neither can they be addressed.

Again *PLEASE* provide the required data.
Comment 25 h m CLA 2022-03-22 21:44:21 EDT
What stacktraces exactly do you need and how to provide them?
Comment 26 Rolf Theunissen CLA 2022-03-23 02:58:26 EDT
(In reply to h m from comment #25)
> What stacktraces exactly do you need and how to provide them?

When you right-click on the entry in your screenshot, the "Sample at ..." line, you can select 'copy'. That will copy the stack for that freeze.

When you right-click and choose 'open log', the full log file will be opened and you can copy the relevant sections.

You could also attach the full log file, located in <workspace>\.metadata\.log
Comment 27 h m CLA 2022-03-27 00:02:27 EDT
Also why is eclipse consuming 2.5-2.9gb out of max 3gb of ram while doing nothing?
Example log:

!SESSION 2022-03-26 20:43:04.675 -----------------------------------------------
eclipse.buildId=4.23.0.I20220308-0310
java.version=16.0.1
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pl_PL
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

This is a continuation of log file x.bak_2.log
Created Time: 2022-03-27 06:00:13.749

!ENTRY org.eclipse.ui.monitoring 2 0 2022-03-27 06:00:13.751
!MESSAGE UI freeze of 0,11s at 06:00:13.636
!SUBENTRY 1 org.eclipse.ui.monitoring 1 0 2022-03-27 06:00:13.751
!MESSAGE Sample at 06:00:13.703 (+0,067s)
Thread 'main' tid=1 (RUNNABLE)
!STACK 0
Stack Trace
	at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
	at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:65)
	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:575)
	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:538)
	at org.eclipse.swt.browser.IE.setText(IE.java:1517)
	at org.eclipse.swt.browser.Browser.setText(Browser.java:1130)
	at org.eclipse.swt.browser.Browser.setText(Browser.java:1088)
	at org.eclipse.jface.internal.text.html.BrowserInformationControl.setInput(BrowserInformationControl.java:322)
	at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1151)
	at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1120)
	at org.eclipse.jface.text.AbstractInformationControlManager.setInformation(AbstractInformationControlManager.java:431)
	at org.eclipse.jface.text.contentassist.AdditionalInfoController.computeInformation(AdditionalInfoController.java:567)
	at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:1101)
	at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:1091)
	at org.eclipse.jface.text.contentassist.AdditionalInfoController.showInformation(AdditionalInfoController.java:541)
	at org.eclipse.jface.text.contentassist.AdditionalInfoController$1.showInformation(AdditionalInfoController.java:478)
	at org.eclipse.jface.text.contentassist.AdditionalInfoController$Timer.lambda$1(AdditionalInfoController.java:362)
	at org.eclipse.jface.text.contentassist.AdditionalInfoController$Timer$$Lambda$1604/0x0000000801b0fd18.run(Unknown Source)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4035)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3635)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.ui.internal.Workbench$$Lambda$177/0x0000000800dfcbb8.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base@16.0.1/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base@16.0.1/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base@16.0.1/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base@16.0.1/java.lang.reflect.Method.invoke(Method.java:567)
	at app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at app//org.eclipse.equinox.launcher.Main.run(Main.java:1467)
Comment 28 Rolf Theunissen CLA 2022-03-27 08:39:19 EDT
(In reply to h m from comment #27)
> Also why is eclipse consuming 2.5-2.9gb out of max 3gb of ram while doing
> nothing?

Memory usage is always a bit counter intuitive, if there are no other processes that need the memory it is good to have your memory well filled. Furthermore, if memory is claimed by a process it is not necessarily actively used, empty swapped out pages don't have any impact on performance. Moreover, it also depends on the settings of the garbage collector.

With respect to the performance issue, from this stacktrace it seams that you run into Bug 314756, which was split of Bug 293856. This one will be extremely difficult to debug, as it appears that the performance issue is in the native win32 code. And it does only occur in your environment.

Are all your stacktraces similar to this one?
Comment 29 h m CLA 2022-03-28 00:09:42 EDT
I will be looking for more samples, but I gave you this one and you tell me that i's in the native code. So every app that has text/autocompletion is having freezes?
Comment 30 Rolf Theunissen CLA 2022-03-28 03:16:38 EDT
(In reply to h m from comment #29)
> I will be looking for more samples, but I gave you this one and you tell me
> that i's in the native code. So every app that has text/autocompletion is
> having freezes?

No, not every app with code completion is affected. Every call to Browser.setText is affected, that is, the browser widget that is used in Eclipse. The native call is a call to Internet Explorer using OLE. Other apps using an embedded Browser might be affected too.

Moreover, this is not the code completion but showing the additional help next to the code completion suggestions, the descriptions of the methods. This window would pop-up after the code completion suggestions.

In your case, does this window show a large description when you experience the problem? That is, could slow rendering of this help page be causing your issue?
Comment 31 h m CLA 2022-03-29 04:02:38 EDT
I don't think there was a big chunk of text.