Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STS Console hang issue in 4.12.0 RELEASE #689

Closed
shankarwww opened this issue Sep 19, 2021 · 29 comments
Closed

STS Console hang issue in 4.12.0 RELEASE #689

shankarwww opened this issue Sep 19, 2021 · 29 comments
Assignees
Labels

Comments

@shankarwww
Copy link

The console is hanging too much in this 4.12.0 RELEASE. Even the scroll bar in console in not responding frequently or its too slow to respond.

@martinlippert
Copy link
Member

Hey @shankarwww, can you provide a few steps how to reproduce the issue or record a screencast that shows the steps and what happens?

@shankarwww
Copy link
Author

Whenever the statement to log is of long length(for example: log a json in console), the console starts hanging and does not respond. The scroll does nor respond.

@martinlippert
Copy link
Member

Can you disable the ANSI Console via the icon in the Console View to see if that makes a difference?

@martinlippert
Copy link
Member

I tried to reproduce this with the latest STS 4.12.0.RELEASE version on macOS, but I don't see a slowdown in the console view. I dumped about 30000 lines of output in there while keeping the ANSI Console on, but scrolling is still smooth and very responsive. I changed the settings on the preferences for the console to use an unlimited buffer, but that didn't change anything, still responsive and fast.

Can you provide a sample project that produces the output in the console that causes the issues on your end? Maybe that helps to reproduce this. You could also experiment with the ANSI Console setting (as mentioned before) and the buffer size for the Console in general in the preferences to see if that makes a difference (to get an idea about what is causing the slowdown on your end).

@drc5521
Copy link

drc5521 commented Oct 10, 2021

Yes,I also encountered the same problem. Especially when viewing the log of springboot startup.The device is windows 10.

1633831210587.mp4

image

@shankarwww
Copy link
Author

I tried to reproduce this with the latest STS 4.12.0.RELEASE version on macOS, but I don't see a slowdown in the console view. I dumped about 30000 lines of output in there while keeping the ANSI Console on, but scrolling is still smooth and very responsive. I changed the settings on the preferences for the console to use an unlimited buffer, but that didn't change anything, still responsive and fast.

Can you provide a sample project that produces the output in the console that causes the issues on your end? Maybe that helps to reproduce this. You could also experiment with the ANSI Console setting (as mentioned before) and the buffer size for the Console in general in the preferences to see if that makes a difference (to get an idea about what is causing the slowdown on your end).

Experiment with the ANSI Console does not help. I am too on windows 10. Issue was in last release(4.11.0) too, but in this release it has become worse.

@martinlippert
Copy link
Member

@shankarwww @drc5521 Thanks for the additional details, so it looks like this problem comes up even without a very long content as the console output (from looking at the video). Does this happen on a plain Eclipse 2021-09 installation as well? Would be great if you could double check that to see if the problem is more with the underlying platform or the specifics in STS.

@drc5521
Copy link

drc5521 commented Oct 12, 2021

@shankarwww @drc5521 Thanks for the additional details, so it looks like this problem comes up even without a very long content as the console output (from looking at the video). Does this happen on a plain Eclipse 2021-09 installation as well? Would be great if you could double check that to see if the problem is more with the underlying platform or the specifics in STS.

Everything is normal in Eclipse 2021-09.After I installed ANSI Console, the problem appeared. The first video is not installed, and the second video is after installation.However, in sts, ANSI Console cannot be uninstalled, and I don't want to uninstall it.

20211012_094433.mp4
20211012_095010.mp4

@martinlippert
Copy link
Member

@drc5521 That is a great comparison, so looks like this is indeed related to the ANSI Console. Therefore, I filed this issue: mihnita/ansi-econsole#66 to let the project owners take a look at this as well.

I am still wondering why this seems to be specific for Windows...

@drc5521
Copy link

drc5521 commented Oct 17, 2021

@drc5521 That is a great comparison, so looks like this is indeed related to the ANSI Console. Therefore, I filed this issue: mihnita/ansi-econsole#66 to let the project owners take a look at this as well.

I am still wondering why this seems to be specific for Windows...

Thank you very much friend. Hope it can be solved perfectly.

@sfksuperman
Copy link

I have the same issue, check here.
I uninstalled the ANSI Console but it is still the same. Please help.

@martinlippert
Copy link
Member

@sfksuperman Can you try to reproduce this with a plain Eclipse 2021-12 installation?

@sfksuperman
Copy link

Installed Eclipse 2021-12 and imported my projects and tried to run as Java Application >> Spring Boot Application but it's failing by saying Sources must not be empty.

And the console looks fine to me, it's not laggy. But I will try to fix the project and run it on Eclipse and let you by tomorrow.

@sfksuperman
Copy link

sfksuperman commented Jan 31, 2022

@martinlippert, I tested it and Eclipse seems to be working fine without any console lag. SO, how to fix the STS console?
Additionally, my CPU usage remains 100% whenever I try to use STS or Eclipse.
image

@martinlippert
Copy link
Member

@sfksuperman Can you capture a few thread dumps of the STS process while CPU is at 100%? And also when the console is lagging? In addition to that it might also be worth to startup a profiler, attach it to the process, and record a short profiling session while the CPU is running so high to gather more details about this.

I assume that you have your IDE running on your local SSD disc with the workspace and all the projects in your workspace also reside on the local SSD disc, so that nothing sits on a network-mounted drive?

@sfksuperman
Copy link

@sfksuperman Can you capture a few thread dumps of the STS process while CPU is at 100%? And also when the console is lagging? In addition to that it might also be worth to startup a profiler, attach it to the process, and record a short profiling session while the CPU is running so high to gather more details about this.

I assume that you have your IDE running on your local SSD disc with the workspace and all the projects in your workspace also reside on the local SSD disc, so that nothing sits on a network-mounted drive?

Yes, everything is on my SSD (C drive). But I don't know much about capturing thread dumps or starting up profiler etc. If you can provide me sufficient guide on how to do it, I might reproduce and record the bug.

@BoykoAlex
Copy link
Contributor

BoykoAlex commented Feb 1, 2022

Win 10 VisualVM sampling snapshot of scrolling ansi console for 30 sec
win10-sampling.zip
.

@BoykoAlex
Copy link
Contributor

OSX Visual VM sampling of scrolling ansi console for 27 sec
osx-sampling.nps.zip

@shankarwww
Copy link
Author

STS 4.14 has been released and issue still remains. It's quite sad and annoying that I have to work with ansi console disabled

@martinlippert
Copy link
Member

We will dive deeper into this and try to find a solution here. Probably involves help from other projects as well, but we will try to get everybody together for this.

@BoykoAlex
Copy link
Contributor

BoykoAlex commented Mar 24, 2022

@martinlippert The issue with the console is "escape sequences" parts of strings in the console that represent color/font etc stuff. Those strings are always present on on the StyledText control. There is a preferences that toggles their visibility in the console view: Show the escape sequences under ANSI Console preferences. If shown "escape sequences" strings show up with some special font, otherwise they are made invisible with:

range.metrics = new GlyphMetrics(0, 0, 0); // Hide the codes

(Example of "escape sequence" string: "�[2m �[0;39m �[32m")

The point is that these strings are always present on the StyledText control. If they are removed the scrolling performance is great again.
I'd direct this to someone on SWT Win team. I have an SWT code snippet to reproduce the issue.

@martinlippert
Copy link
Member

@BoykoAlex thanks for diving deeper into this. Please open a bug report for SWT for this and attach the SWT code snippet that reproduces the slowdown and add a link to that bugzilla issue here. I will let the SWT know about this then and hope to raise some interest in it... :-)

@BoykoAlex
Copy link
Contributor

@martinlippert here is the Eclipse SWT bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=579406

@BoykoAlex
Copy link
Contributor

@martinlippert should be fixed in Eclipse 4.24. Fixed in this build already: https://download.eclipse.org/eclipse/downloads/drops4/I20220324-0140/

@martinlippert
Copy link
Member

I've setup the build infrastructure to produce early-access builds of STS 4.14.1 CI builds on top of the early but latest Eclipse 2022-06 integration builds where this issue should be fixed.

@shankarwww Can you try the latest CI build from https://dist.springsource.com/snapshot/STS4/nightly-distributions.html for Eclipse 2022-06 builds to verify that this issue is fixed there?

@martinlippert
Copy link
Member

@shankarwww @drc5521 👆Maybe you want to give these CI builds on Eclipse 2020-06 a try, too?

@shankarwww
Copy link
Author

@martinlippert I have downloaded STS Version: 4.15.1.RELEASE. The console performance has improved on windows. But still its not that smooth as compared to the console of VSCode or IntelliJ IDEA. I still find some lag/hanging when there is little bit large json.

@martinlippert
Copy link
Member

@shankarwww Maybe this is related to mihnita/ansi-econsole#66 ?The latest comments in there suggest that this might be related to the output limit for the console. Can you try what they suggest to workaround this (or to verify that the issue you are seeing is indeed the same)? That would be great.

@martinlippert
Copy link
Member

I am closing this one here as a duplicate of mihnita/ansi-econsole#66. Discussion should continue over there. If you are facing another issue unrelated to mihnita/ansi-econsole#66, please create a new issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants