Skip to content

slow performance on relative large file (1500 lines) #142

@phanen

Description

@phanen

Repro

Tested with nvim 0.11:

> repro.nix curl https://raw.githubusercontent.com/NixOS/nixpkgs/e14ae009dd2b851991007df7f4bb190d3d6ece88/nixos/tests/all-tests.nix
mkdir -p ~/.local/share/foo/site
ln -sf ~/.local/share/{nvim, foo}/site/queries
ln -sf ~/.local/share/{nvim, foo}/site/parser
time NVIM_APPNAME=foo nvim repro.nix +"let g:_ts_force_sync_parsing = 0" +"lua vim.treesitter.start()" +"lua vim.schedule(vim.cmd.quit)"

It take 3s to load the buffer (~1500 lines) on my machine


________________________________________________________
Executed in    2.94 secs      fish           external
   usr time    8.53 millis  747.00 micros    7.78 millis
   sys time    2.42 millis    0.00 micros    2.42 millis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions