-
Notifications
You must be signed in to change notification settings - Fork 58
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
A lot of UI freezes caused by DocumentLinkDetector.detectHyperlinks #698
Comments
Since DocumentLinkDetector is executed on the UI thread I don't think it should block for up to four seconds, no matter what the reason is: |
I see this same issue in CDT LSP - see eclipse-cdt/cdt-lsp#138 The 4 seconds here came from combining 2 different gets of 2 seconds each when the code was refactored. I also see 800 ms timeouts (and corresponding freezes): |
I also wonder why/what takes 4 seconds. It does not matter how large the source file is I am editing. It also freezes for very small Java classes. |
Do you have the LSP4E trace - I see this in the log:
and numerous other ones with many seconds to reply. These are all happening in CDT LSP case when the language server is genuinely very slow to respond. |
How can I enable the trace? I downloaded the pre-built Eclipse distribution. |
I ran eclipse with |
No, we haven't |
@sebthom: are there any new info on this issue? For C/C++ projects it depends on the amount of files in a project. Not very much on the size of the opened file. |
For some reasons the issue disappeared on my machine for now. |
When I see your threaddump, I have seen: "ForkJoinPool.commonPool-worker-80" #5782 daemon prio=5 os_prio=0 cpu=234.38ms elapsed=6748.25s tid=0x000001ef32af7020 nid=0x7630 waiting on condition [0x00000061d9cfe000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@17.0.7/Native Method)
- parking to wait for <0x000000073d8ad2a8> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(java.base@17.0.7/LockSupport.java:211)
at java.util.concurrent.CompletableFuture$Signaller.block(java.base@17.0.7/CompletableFuture.java:1864)
at java.util.concurrent.ForkJoinPool.compensatedBlock(java.base@17.0.7/ForkJoinPool.java:3449)
at java.util.concurrent.ForkJoinPool.managedBlock(java.base@17.0.7/ForkJoinPool.java:3432)
at java.util.concurrent.CompletableFuture.waitingGet(java.base@17.0.7/CompletableFuture.java:1898)
at java.util.concurrent.CompletableFuture.get(java.base@17.0.7/CompletableFuture.java:2072)
at org.eclipse.lsp4e.operations.completion.LSContentAssistProcessor.computeCompletionProposals(LSContentAssistProcessor.java:114)
at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$10(AsyncCompletionProposalPopup.java:378)
at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup$$Lambda$4370/0x00000007c291a8a8.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$9(AsyncCompletionProposalPopup.java:377)
at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup$$Lambda$4368/0x00000007c291a448.get(Unknown Source)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(java.base@17.0.7/CompletableFuture.java:1768)
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(java.base@17.0.7/CompletableFuture.java:1760)
at java.util.concurrent.ForkJoinTask.doExec(java.base@17.0.7/ForkJoinTask.java:373)
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.base@17.0.7/ForkJoinPool.java:1182)
at java.util.concurrent.ForkJoinPool.scan(java.base@17.0.7/ForkJoinPool.java:1655)
at java.util.concurrent.ForkJoinPool.runWorker(java.base@17.0.7/ForkJoinPool.java:1622)
at java.util.concurrent.ForkJoinWorkerThread.run(java.base@17.0.7/ForkJoinWorkerThread.java:165) Which is waiting for infinite time here https://github.com/eclipse/lsp4e/blob/55ce45f20dba1147cfa8383412f0105bfe96fc2e/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/completion/LSContentAssistProcessor.java#L114 And as the future is never canceled, I suspect it is the same issue than #743 (comment) I did a PR to cancel this future #750 |
Can this issue be clone in this case @sebthom? |
I upgraded to Eclipse 2023-06 and it is barely usable for me to do Java coding. I am experiencing constant UI freezes when doing operations like:
When the UI freezes occur I always see the same stacktrace in a thread dump:
threaddump.txt
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: