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

Huge CPU hit when doing :bufdo #45

Closed
joaumg opened this issue Feb 9, 2017 · 2 comments
Closed

Huge CPU hit when doing :bufdo #45

joaumg opened this issue Feb 9, 2017 · 2 comments

Comments

@joaumg
Copy link

joaumg commented Feb 9, 2017

Hello, I have a somewhat huge'ish amount of files ( ~140 files ), and when I run a bufdo in all of them, wakatime ( exactly python -W ignore /home/.../vim-wakatime/plugin/packages/wakatime/cli.py --entity ... ) spawns like 10+ processes, each consuming up to 5% of the cpu ( 50% in total ).

Is there a way to disable wakatime on bufdo's ? Is this expected behavior?

cpu_usage

@alanhamlett
Copy link
Member

alanhamlett commented Apr 20, 2017

If your bufdo command is writing to all open buffers, then WakaTime will think your coding in all those buffers. Maybe there's a way to detect bufdo usage and disable WakaTime for that command?

The way other editor plugins mitigate this is by buffering heartbeats in memory, then attaching them to one Python process as --extra-heartbeats every 10 seconds. That way all these Python processes would become one:
sublime-wakatime/WakaTime.py#L529

@alanhamlett
Copy link
Member

Fixed with 8a72498. Can you upgrade the plugin and see if the performance is better when using :bufdo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants