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

Neovim becomes very slow when opening an ass file #25950

Closed
benqhdri opened this issue Nov 9, 2023 · 5 comments · Fixed by #28551
Closed

Neovim becomes very slow when opening an ass file #25950

benqhdri opened this issue Nov 9, 2023 · 5 comments · Fixed by #28551
Labels
bug issues reporting wrong behavior bug-vim wrong behavior inherited from vim performance issues reporting performance problems syntax regex syntax or non-regex parsing, lpeg, grammars
Milestone

Comments

@benqhdri
Copy link

benqhdri commented Nov 9, 2023

Problem

When I set syntax on, even if I opened nvim with nvim --clean, editting an ass file would be very slow.

neovim version:

NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1692716794

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

example ass file I used to test:
https://github.com/EugeneLiu/translationCSAPP/blob/master/subtitle/translation/Lecture%2001%20%20course_overview.ass
image

Steps to reproduce

*copy the ass file from https://github.com/EugeneLiu/translationCSAPP/blob/master/subtitle/translation/Lecture%2001%20%20course_overview.ass
*
nvim --clean Lecture\ 01\ \ course_overview.ass

Expected behavior

Expect neovim not be that slow :)

Neovim version (nvim -v)

NVIM v0.9.4

Vim (not Nvim) behaves the same?

No(vim would not highlight ass file after syntax on). Vim version: 8.2

Operating system/version

ubuntu 22(wsl)

Terminal name/version

windows terminal 1.18.230526002-preview

$TERM environment variable

screen-256color

Installation

download the release version

@benqhdri benqhdri added the bug issues reporting wrong behavior label Nov 9, 2023
@duarm
Copy link

duarm commented Nov 10, 2023

Can't reproduce with nvim -u NONE, can reproduce with nvim --clean, running syntax off fixes the problem.

@clason
Copy link
Member

clason commented Nov 10, 2023

You should never use syntax on in Neovim.

@duarm
Copy link

duarm commented Nov 10, 2023

with nvim --noplugin -u NORC , syntax is set to ssa(same as ass), shouldn't syntax off be the default in neovim? Added

vim.cmd [[ syntax off ]]

as a workaround, pretty sure I had this, but removed it since it became the default

:verbose set syntax
  syntax=ssa
        Last set from /usr/share/nvim/runtime/syntax/syntax.vim line 35

@clason
Copy link
Member

clason commented Nov 10, 2023

@zeertzjq feel free to enlighten us.

@zeertzjq zeertzjq removed their assignment Nov 10, 2023
@justinmk justinmk added performance issues reporting performance problems syntax regex syntax or non-regex parsing, lpeg, grammars bug-vim wrong behavior inherited from vim labels Nov 13, 2023
@justinmk justinmk added this to the unplanned milestone Nov 13, 2023
@duarm
Copy link

duarm commented Nov 13, 2023

since the ass format is almost an .ini, I made a quick tree-sitter parser for it using the .ini as a base, since I needed it too. It runs much better https://gitlab.com/duarm1/tree-sitter-ass

ObserverOfTime added a commit to ObserverOfTime/neovim that referenced this issue Apr 28, 2024
runtime(ssa): improve syntax file performance (vim/vim#14654)

fixes: vim/vim#14653
fixes: neovim#25950

vim/vim@f351fd8
@zeertzjq zeertzjq modified the milestones: unplanned, 0.10 Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior bug-vim wrong behavior inherited from vim performance issues reporting performance problems syntax regex syntax or non-regex parsing, lpeg, grammars
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants