vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Intellisense very slow and usually takes high peeks of CPU and memory

Open jonathanvila opened this issue 3 years ago • 3 comments

[provide a description of the issue] Coding, takes a lot for intellisense to show members....in cases around 4 secods, and also consumes peeks of high cpu and memory

Environment
  • Operating System: Fedora 33
  • JDK version: OpenJDK 11.0.9
  • Visual Studio Code version:1.55.1
  • Java extension version:0.76
Steps To Reproduce

Dont touch the code, and once you go and put a . in the code expecting intellisense to show members, it takes several seconds and produces a peek on cpu and memory consumption.

[Please attach a sample project reproducing the error] Please attach logs

LOG 15:34:15 ❯ code --status
Version: Code 1.55.1 (08a217c4d27a02a5bcde898fd7981bda5b49391b, 2021-04-07T15:01:24.315Z) OS Version: Linux x64 5.10.9-201.fc33.x86_64 CPUs: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700) Memory (System): 30.81GB (12.12GB free) Load (avg): 6, 23, 17 VM: 0% Screen Reader: no Process Argv: --no-sandbox --unity-launch --crash-reporter-id d07879a8-21a9-4e94-9263-6d6134b682bb GPU Status: 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: disabled_software skia_renderer: enabled_on video_decode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled

CPU % Mem MB PID Process 0 63 1501952 code main 0 0 1502017 zygote 0 0 1502018 zygote 0 0 1502138 utility 2 505 1502154 window (AssessmentSvcTest.java - workspace.pathfinder (Workspace) - Visual Studio Code) 0 505 1502636 extensionHost 0 0 1502910 electron_node server.js 0 63 1502917 electron_node server.js 0 0 1502925 electron_node languageserver.js 33 1578 1503130 /home/jonathan/.sdkman/candidates/java/current/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -javaagent:/home/jonathan/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -jar /home/jonathan/.vscode/extensions/redhat.java-0.76.0/server/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar -configuration /home/jonathan/.config/Code/User/globalStorage/redhat.java/0.76.0/config_linux -data /home/jonathan/.config/Code/User/workspaceStorage/45a531d9c2d51a4824623ae422ac4572/redhat.java/jdt_ws 0 63 1503338 /usr/share/code/code /usr/share/code/resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=1502636 0 63 1504100 /home/jonathan/.sdkman/candidates/java/current/bin/java -Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication -cp /home/jonathan/.vscode/extensions/redhat.vscode-microprofile-0.2.0/server/* org.eclipse.lsp4mp.ls.MicroProfileServerLauncher 0 63 1537408 /home/jonathan/.sdkman/candidates/java/current/bin/java -noverify -Xmx64M -cp /home/jonathan/.vscode/extensions/redhat.vscode-xml-0.15.0/server/org.eclipse.lemminx-0.15.0-uber.jar org.eclipse.lemminx.XMLServerLauncher 0 0 3755721 electron_node server.js 0 0 1502677 watcherService 0 63 1502662 shared-process 0 0 1502705 ptyHost 0 0 1541761 /usr/bin/zsh 0 0 3743905 /usr/bin/zsh 0 0 3769694 window (undefined)

Workspace Stats: | Window (AssessmentSvcTest.java - workspace.pathfinder (Workspace) - Visual Studio Code) | Folder (tackle-controls): 782 files | File types: jar(525) sql(44) java(36) class(36) sh(8) json(7) yml(6) | lst(6) properties(4) prefs(4) | Conf files: github-actions(3) | Folder (windup-operator): 1973 files | File types: java(882) yaml(285) jar(155) release(152) yml(143) sh(85) | class(16) xml(13) md(8) json(8) | Conf files: github-actions(1) | Folder (tackle-pathfinder): 3272 files | File types: java(1516) xml(348) sql(304) jar(266) yaml(193) | plantuml(92) sh(73) json(71) yml(69) properties(66) | Conf files: github-actions(3) launch.json(1) | Launch Configs: java | Folder (tackle-commons-rest): 604 files | File types: jar(241) java(52) class(45) prefs(14) lst(10) xml(9) | properties(6) txt(5) yml(4) gitignore(4) | Conf files: github-actions(3) | Folder (windup-openshift): 5048 files | File types: jar(2966) xml(906) groovy(113) si(44) cfe(36) cfs(36) | txt(32) sh(23) xsl(20) json(18) | Conf files:

jonathanvila avatar Apr 15 '21 13:04 jonathanvila

Can you try to disable all your other Java related extensions and see if performance improves? Can you share your project?

fbricon avatar Apr 15 '21 13:04 fbricon

@fbricon

  • I dont have other Java related extensions ( that I am aware of ) . Can I disable all except one, from the command line to not disabling manually one by one on the IDE ?
  • https://github.com/jonathanvila/tackle-pathfinder

NOTE : apparently 1.55.2 seems to work better, but I've only used for 1 day. Although it still consumes a lot of memory, and sometimes has peeks of around 30% CPU. But up to now not machine blocking, and the peeks are very short in time. image

jonathanvila avatar Apr 16 '21 07:04 jonathanvila

Please disable Spring Boot Tools from Pivotal!!!

This extension doesn't work well with other Java extesions. After disabling it, I've seen significant speed increase with Intellisense, and CPU load reduced as a result. Please get rid of the thing!!!

Enfield-Li avatar Aug 10 '22 23:08 Enfield-Li