macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.47k stars 680 forks source link

high cpu usage after update to MacVim r179 (Vim 9.1.0) #1474

Open nico opened 5 months ago

nico commented 5 months ago

Steps to reproduce

  1. Update to MacVim r179 (Vim 9.1.0)
  2. Use it

Expected behaviour

Fairly low CPU usage.

Version of Vim and architecture

MacVim r179 (Vim 9.1.0), arm64

Environment

Operating system: macOS 13.5.2 (22G91) Arch: arm64

How MacVim was installed

downloaded from github, auto-updated via sparkle

Logs and stack traces

I'll attach a sample taking in Activity Monitor.

I only have 6 windows open. Usually I have way more, and CPU usage is negligible. Now it hovers at around 12%.

I use very few plugins.

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

Issue has been tested with no configuration

Other conditions

nico commented 5 months ago

Sample:

macvim.txt

ychin commented 5 months ago

Hmm that's not good, let me take a look. Just for context can you tell me the plugins you have installed? And have you run with --clean (r179 has a new menu item to do this)? Or is this too intermittent for that?

nico commented 5 months ago

I haven't seen it yet after restarting.

% ls ~/.vim/plugin 
NERD_commenter.vim  surround.vim
% ls ~/.vim/pack/plugins/start 
dash.vim    fugitive    gn      llvm
ychin commented 5 months ago

If you see it again, can you post it here? I'll keep this issue for a while for now.

Sometimes there are issues with stale Vim processes that crashed leading to a railed CPU (see #1423). This doesn't seem like it but I can't think of anything else.

Also, are you sure it was MacVim process going ham on the CPU, or was it the hosted Vim processes?

nico commented 4 months ago

Just happened again (i.e. it happens only rarely).

Sample of MacVim.txt

Yes, it's the MacVim process:

Screenshot 2024-02-22 at 11 11 46 AM