Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wakatime CLI being called multiple times and causing High CPU and Memory #363

Closed
glennsarti opened this issue May 6, 2021 · 12 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@glennsarti
Copy link

The wakatime extension appears to be calling the API many times over and causing very high cpu usage and memory consumption

image

Using wakatime 7.0.2

image

@glennsarti
Copy link
Author

VSCode info

image

@alanhamlett
Copy link
Member

Switching back to legacy Python wakatime-cli in v8.0.0 until we can fix this.

@glennsarti
Copy link
Author

Yeah...even if I call wakatime by itself... it just sits there :-(

C:\Users\glenn\.wakatime> c:\Users\glenn\.wakatime\wakatime-cli-windows-amd64.exe --entity c:\Source\oss\spike-go-ls\peslsp\server.go --plugin "\"vscode/1.55.2 vscode-wakatime/7.0.2\"" --alternate-project spike-go-ls --write --config C:\Users\glenn\.wakatime.cfg --log-file C:\Users\glenn\.wakatime.log --verbose --timeout 1

log file

{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:94","func":"Run","level":"debug","message":"command: heartbeat","now":"2021-05-06T14:46:52+08:00","version":"v1.0.0"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/heartbeat/heartbeat.go:67","func":"SendHeartbeats","level":"debug","message":"heartbeat params: category: 'coding', cursor position: '', entity: 'c:\\Source\\oss\\spike-go-ls\\peslsp\\server.go', entity type: 'file', num extra heartbeats: 0, hostname: 'GLENNSARTI', is write: true, language: '', line number: '', lines in file: '', offline disabled: false, offline sync max: 100, time: 1620283612.33873, api params: (api key: '6710...', api url: 'https://api.wakatime.com/api', plugin: '\\', timeout: 1s), filter params: (exclude: '[]', exclude unknown project: false, include: '[]', include only with project file: false), network params: (disable ssl verify: false, proxy url: '', ssl cert filepath: ''), project params: (alternate: 'spike-go-ls', disable submodule: '[]', map patterns: '[]', override: ''), sanitize params: (hide branch names: '[]', hide file names: '[]', hide project names: '[]')","now":"2021-05-06T14:46:52+08:00","version":"v1.0.0"}

@glennsarti
Copy link
Author

glennsarti commented May 6, 2021

Not necessarily the extensions fault but 🤷‍♂️ that's where we see the problem

@alanhamlett
Copy link
Member

It's better after upgrading to v8.0.0?

@glennsarti
Copy link
Author

Trying now ....

@glennsarti
Copy link
Author

Yup... I can see waka-time.exe start and quickly exit. Nothing hanging around.

@glennsarti
Copy link
Author

Sorry I can't debug into why the new cli package is failing 😭

Unfortunately there doesn't appear to be anything to output debug information to STDOUT. Just a --verbose flag.

@alanhamlett
Copy link
Member

It's ok, we'll get it figured out.

@alanhamlett alanhamlett transferred this issue from wakatime/vscode-wakatime May 6, 2021
@github-actions github-actions bot added the triage label May 6, 2021
@gandarez gandarez added bug Something isn't working and removed triage labels May 6, 2021
@alanhamlett
Copy link
Member

@glennsarti can you add this to your ~/.wakatime.cfg file under [settings]:

legacy_python_cli = false
alpha = true

After adding those 2 lines, reload vscode and see if that fixes it for you?

@alanhamlett
Copy link
Member

Fixed with #364 and released in v1.6.0.

@glennsarti
Copy link
Author

Thanks @alanhamlett !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants