Kode/vscode-kha

Extension causes high cpu load

Closed this issue · 6 comments

  • Issue Type: Performance
  • Extension Name: kha
  • Extension Version: 20.1.0
  • OS Version: Windows_NT x64 10.0.18362
  • VSCode version: 1.41.1

CPU profile : kodetech.kha-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load


The Kha extension is reported by VS Code as "taking a very long time" and preventing other extensions from working correctly. As you can see from the CPU profile, the extension is stuck in addLibrary, in Kha/Tools/khamake/out/Project.js. Additionally, pressing Ctrl+Shift+B to display build tasks never completes, making the "Fetching build tasks..." message stay indefinitely in the bottom left of the window.

Update : addLibrary seems to be broken by the dependencies field of libraries' haxelib.json files.

The fetching build tasks-problem is solved, don't know whether that also solved the high cpu load message. Also don't know what your latest comment even means.

Try using HaxePunk through addLibrary('HaxePunk') after replacing "install" by "dependencies" on line 10 of the library's haxelib.json. As far as I know, install is legacy and dependencies is the currently valid keyword.

But that's not at all related to the vscode extension, right?

Well it is, because using "dependencies" instead of "install" is what causes the infinite "fetching build tasks" and the "Kha took a very long time" error message for me.

Well, that's a side-effect then. I'll close this one, open a khamake issue about it please.