redhat-developer / redhat-developer/vscode-java

High CPU remains after building finishes (macOS High Sierra)

未关闭
#583 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

performance
主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先查看 server.log 和 Process Sample of java.txt,然后在 VS Code 中的 Maven 项目上启用 java.autobuild.enabled 以重现报告。比较自动构建和手动构建后的 Java 进程;完成的标准是自动构建完成后,在代码未发生更改的情况下 CPU 恢复到接近空闲状态。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, vscode
领域
devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。