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

perf(treesitter): disable in big files #3268

Merged

Conversation

LostNeophyte
Copy link
Member

Description

Disables treesitter in files larger than 1MB

fixes #3149

How Has This Been Tested?

Opened these files: canada.json, 100MB sql file compressed using 7zip and disguised as txt

lua/lvim/core/treesitter.lua Outdated Show resolved Hide resolved
lua/lvim/core/treesitter.lua Outdated Show resolved Hide resolved
lua/lvim/core/treesitter.lua Outdated Show resolved Hide resolved
lua/lvim/core/treesitter.lua Outdated Show resolved Hide resolved
lua/lvim/core/treesitter.lua Outdated Show resolved Hide resolved
lua/lvim/core/treesitter.lua Outdated Show resolved Hide resolved
@LostNeophyte LostNeophyte force-pushed the perf/disable-treesitter-in-big-files branch 2 times, most recently from 096b2b9 to 2ac90b5 Compare October 25, 2022 16:34
Copy link
Collaborator

@kylo252 kylo252 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still slightly slow to move the cursor the very first time, but the difference is massive. Thanks!

@LostNeophyte
Copy link
Member Author

Should I change the base branch to master?

@LostNeophyte LostNeophyte force-pushed the perf/disable-treesitter-in-big-files branch from 495c02d to d810cdd Compare October 27, 2022 06:13
@LostNeophyte LostNeophyte changed the base branch from rolling to master October 27, 2022 06:13
Copy link
Collaborator

@kylo252 kylo252 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@kylo252 kylo252 merged commit 978ff7c into LunarVim:master Nov 1, 2022
tomazursic pushed a commit to tomazursic/LunarVim that referenced this pull request Nov 1, 2022
* upstream/master:
  perf(treesitter): disable in big files (LunarVim#3268)
  fix(breadcrumbs) Performance issue, change CursorMoved event to CursorHoldI (LunarVim#3357)
  chore: bump plugins version (LunarVim#3368)
  fix(alpha): make startify sections always appear (LunarVim#3371)
  fix(lsp): only launch installed servers (LunarVim#3366)
  fix(defaults): don't use smartindent (LunarVim#3363)
  fix: statusline and breadcrumbs hls reload with config reload (LunarVim#3376)
  refactor(installer): skip unstable headless update (LunarVim#3338)
  chore(plugins): bump plugins version (LunarVim#3364)
  chore: bump plugins version (LunarVim#3276)
@LostNeophyte LostNeophyte deleted the perf/disable-treesitter-in-big-files branch November 6, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unable to work with big json file
2 participants