microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.73k stars 8.33k forks source link

The Neovim inside Windows Terminal is a bit laggy when working with large files #10961

Closed janeusz2000 closed 2 years ago

janeusz2000 commented 3 years ago

Windows Terminal version (or Windows build number)

1.7.1033.0

Other Software

Hardware Configuration:

CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz  
RAM: 16,0 GB (15,8 GB usable)

Windows specifications:

Edition Windows 10 Enterprise
Version 20H2
Installed on    ‎15.‎06.‎2021
OS build    19042.1110
Experience  Windows Feature Experience Pack 120.2212.3530.0

Software Configuration: Native neovim installed on windows.

init.vim:

set exrc

let &t_SI.="\e[5 q"
let &t_SR.="\e[4 q"
let &t_EI.="\e41 q"

set relativenumber
set nohlsearch
set hidden
set noerrorbells
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set nu
set nowrap
set noswapfile
set nobackup
set undodir=C:\Users\mateusz.janik\AppData\Local\nvim\undodir
set undofile
set incsearch
set termguicolors
set scrolloff=8
set noshowmode
set completeopt=menuone,noinsert,noselect
set colorcolumn=120
set signcolumn=yes

" use system clipboard
set clipboard+=unnamedplus

" Give more space for displaying messages
set cmdheight=2
set timeoutlen=1000
set ttimeoutlen=0

set updatetime=50
set shortmess+=c
set cul!

call plug#begin('~/.vim/plugged')
Plug 'nvim-lua/popup.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'gruvbox-community/gruvbox'

" telescope requirements...
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzy-native.nvim'

"cmake
"Plug 'cdelledonne/vim-cmake'
call plug#end()

colorscheme gruvbox
highlight Normal guibg=none
highlight LineNr guifg=#16bdc9

let mapleader = " "
" telescope macros
nnoremap <leader>ps :lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For > ")})<CR>
nnoremap <leader>pf :lua require('telescope.builtin').find_files()<CR>

Steps to reproduce

Expected Behavior

text scrolling works smoothly, there is no lag like in Linux or MacOs terminal.

Actual Behavior

Text is stuttering, it doesn't render text smoothly. Now vim experience in terminal is worse then vim extension experience in VSCode :C

zadjii-msft commented 3 years ago

This sounds a lot like #10795. Does this only happen with a short repeat delay / fast repeat rate?

janeusz2000 commented 3 years ago

This sounds a lot like #10795. Does this only happen with a short repeat delay / fast repeat rate?

"short" term is very relative :P let's say the text is stuttering every 1s before it updates ... it looks more like it doesn't render text fast enough ;)

janeusz2000 commented 3 years ago

Sorry I misunderstood :P Keyboard repeating settings doesn't not have any influence on terminal. It stutters exactly in the same way with set long delay and short delay ;)

hoangtrann commented 3 years ago

@janeusz2000 I wonder if you have issue while using nvim-tree, let it open when working with large file. It's extremely laggy if have tree open on the side while working on large file as well

janeusz2000 commented 3 years ago

@janeusz2000 I wonder if you have issue while using nvim-tree, let it open when working with large file. It's extremely laggy if have tree open on the side while working on large file as well

I don't use nvim-tree unfortunately, so I don't know. This could also be the issue with the plugin, but I think that Lua is fast enough, that even if you had a polluted project directory with many files, this shouldn't be an issue :) Idk

zadjii-msft commented 2 years ago

You know, there's been a lot of perf improvements in the last year - you still seeing this/?

If you are, maybe try out a Preview build of the Terminal, and enable the experimental rendering engine (under "Advanced" in the profile settings). (you'll need to restart the tab for the changes to take effect). That should be more performant.

If it's not, then maybe this is just a framerate of conpty issue - like, conpty only ever updates the terminal at 60fps. Maybe that's the limit we're hitting here.

janeusz2000 commented 2 years ago

Not anymore ;) everything works really well right now

zadjii-msft commented 2 years ago

Thats great to hear! We must have just fixed this with some other optimization along the way. Thanks for following up!