-
Notifications
You must be signed in to change notification settings - Fork 408
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
Improve performance of code actions, and certain delegate commands #2803
Conversation
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java
Outdated
Show resolved
Hide resolved
// see https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/2799 | ||
// Handle the paste event synchronously in the main thread | ||
if (IDelegateCommandHandler.JAVA_EDIT_HANDLE_PASTE_EVENT.equals(params.getCommand())) { | ||
Object result = commandHandler.executeCommand(params, new NullProgressMonitor()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is your thinking here that it's pointless to report progress on the paste event ? I kind of agree. I know we don't currently report progress to the client for delegates via progress support but we may implement it in the future.
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java
Outdated
Show resolved
Hide resolved
@rgrunber I have updated the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inspecting this in VisualVM I see :
After the threads are able to acquire the lock, they each hit the monitor.isCancelled()
and it ends there. This is probably better than having them all run.
Can you modify the commit message to :
Improve performance of code actions, and certain delegate commands
- Handle paste event & smart semicolon detection synchronously (main thread)
- Permit only a single code action to be handled at once
- Handle paste event & smart semicolon detection synchronously (main thread) - Permit only a single code action to be handled at once A related issue - eclipse-jdtls#2799 Signed-off-by: Snjezana Peco <[email protected]>
I have modified it. |
Fixes #2799
Fixes redhat-developer/vscode-java#3199