ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.82k stars 451 forks source link

feat(treesitter): lessened performance restrictions #1305

Closed Jint-lzxy closed 1 week ago

Jint-lzxy commented 1 week ago

This commit lifts some of the performance restrictions previously imposed on Treesitter when incremental parsing was not yet supported. Specifically:

Treesitter will now only be disabled by default for files exceeding 7,500 lines or 2 MiB in size. Testing on an Intel i9-9880H with Apple SSD AP1024N shows noticeable lag at these thresholds.

Further testing on different CPUs and/or SSD combinations is welcome lol

ayamir commented 1 week ago

For my machine (AMD Ryzen 7 6800HS with Sumsung 980 Pro), there is a noticeable delay (about 2~3s) when trying to enter characters for the first time for a cpp file with 7495 lines. The startuptime is 261.81ms. I didn't meet the error above BTW.

ayamir commented 1 week ago

These settings are ok for macbook pro 16-inch, 2019 with 2.6 GHz Intel Core i7 (six cores). The startuptime is 316.72ms and about 2~3s delay when trying to enter characters for the first time.