redhat-developer / redhat-developer/vscode-java

Java package taking 100% CPU under very specific conditions

Open
#4,052 2 comments 3 reactions 1 assignee View on GitHub

@snjeza is already working on this.

Since Jan 30, 2026.

performance upstream
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Here are the minimal conditions needed to reproduce this issue:

  • A Java package has a dependency on Lombok.
  • A method uses Lombok's @NonNull on a parameter.
  • The first line of the method is a comment.
  • The line after the comment is NOT empty.
  • The lombok.nonNull.exceptionType = JDK option is set in a lombok.config file.

If you open this project in VS Code with the redhat.java extension, any modification in that same file that does not break the above criteria (such as adding a comment on the last line and saving) will take 100% of one CPU core. Do it 5 times, and it will take 5 cores!

This high CPU usage stops after a while, but it makes the whole machine unresponsive if you make several modifications quickly.

You can use this minimal repo to reproduce the bug: ipkiss42/vscode-java-4052.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.