redhat-developer / redhat-developer/vscode-java

High CPU remains after building finishes (macOS High Sierra)

Open
#583 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When the Java autobuild setting is enabled, even after the build finishes, the CPU remains high (2 to 3 cores at 100% on a 8 HT core system) for the java process, even after a few minutes, and without making any code changes (or even touching the VSCode during that period). Disabling auto-build ("java.autobuild.enabled":false) and restarting VSCode, then manually building, the CPU usage returns to close to idle after the build completes (which is what is expected).

Environment
  • Operating System: macOD High Sierra 10.13.5 (MacBook Pro retina mid-2012)
  • JDK version: 8.0_131
  • Visual Studio Code version: 1.25.0
  • Java extension version: 0.3.0
Steps To Reproduce
  1. On a Mac start up VSCode and make sure java.autobuild.enabled:true (default)
  2. Load up a Maven project
  3. Let it build automatically; when the build finishes, monitor the CPU usage for the "java" named process.
Current Result

CPU usage remains high and doesn't seem to come down even after a few minutes

Expected Result

CPU usage to come close to idle after build completes

Additional Informations

The only java program running at that time is the plugin:

$ jps -v
18472 Jps -Dapplication.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home -Xms8m
18346 org.eclipse.equinox.launcher_1.5.100.v20180611-1436.jar -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Xverify:none -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication

server.log
Process Sample of java.txt

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.

Research direction

Start by reviewing server.log and Process Sample of java.txt, then reproduce the report with java.autobuild.enabled enabled on a Maven project in VS Code. Compare the Java process after automatic and manual builds; done means CPU returns close to idle after the automatic build completes without code changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.