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

High CPU usage on Fedora 40 #14650

Closed
zhscn opened this issue Apr 27, 2024 · 4 comments
Closed

High CPU usage on Fedora 40 #14650

zhscn opened this issue Apr 27, 2024 · 4 comments
Labels

Comments

@zhscn
Copy link

zhscn commented Apr 27, 2024

Steps to reproduce

  1. Open one log file, here is an example of mine, the complete file size is about 250M
    log.txt
  2. Press Ctrl-D to continue scrolling down.
  3. CPU usage reaches 100%
    Screenshot from 2024-04-27 11-02-12

flamegraph:
flamegraph

Expected behaviour

CPU usage should be at a low level.

Version of Vim

9.1.309

Environment

OS: fedora 40
terminal: gnome-terminal-3.50.1-6.fc40.x86_64
$TERM: xterm-256color

Logs and stack traces

No response

@zhscn zhscn added the bug label Apr 27, 2024
@zhscn
Copy link
Author

zhscn commented Apr 27, 2024

git bisect shows that 9148ba8 caused this problem.

@chrisbra
Copy link
Member

ping @luukvbaal

@zzzyxwvut
Copy link
Contributor

Vim with --clean and the LargeFile plugin (available from
here and here) may also help:

vim --clean -Nu NONE '+set pp=~/.vim rtp=~/.vim' log.log

@luukvbaal
Copy link
Contributor

luukvbaal commented Apr 27, 2024

Hmm almost missed this despite the ping because of the nondescript issue title.
We just spend a lot of cycles in plines_m_win() with limit_winheight == FALSE. We need to count until w_height + count so limit_winheight == TRUE doesn't work. Could add a new argument to plines_m_win() to that end.

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

Successfully merging a pull request may close this issue.

4 participants