wakatime / vscode-wakatime

Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/vs-code
BSD 3-Clause "New" or "Revised" License
1.24k stars 137 forks source link

Extension causes high cpu load #306

Closed onlyreddy closed 11 months ago

onlyreddy commented 2 years ago

:warning: Make sure to attach this file from your home-directory: :warning:file:///c%3A/Users/username/AppData/Local/Temp/WakaTime.vscode-wakatime-unresponsive.cpuprofile.txt

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

alanhamlett commented 2 years ago

Please attach the cpuprofile.txt file so we can see what's causing the high cpu usage.

alanhamlett commented 1 year ago

It's most likely due to many wakatime-cli processes forked at the same time. We'll fix this by buffering heartbeats in vscode, then only forking wakatime-cli once every ~10 seconds.

alanhamlett commented 11 months ago

Should be fixed with https://github.com/wakatime/wakatime-cli/pull/960.