Skip to content

perf: add option to disable treesitter on large non-LOCAL diff buffers#99

Merged
dlyongemallo merged 1 commit intomainfrom
large_files_diff_speed
Apr 9, 2026
Merged

perf: add option to disable treesitter on large non-LOCAL diff buffers#99
dlyongemallo merged 1 commit intomainfrom
large_files_diff_speed

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 09:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a configuration option to mitigate performance issues by disabling tree-sitter for very large non-LOCAL diffview revision buffers, aiming to keep large diffs responsive (notably in file history views).

Changes:

  • Introduces large_file_threshold config option (default 0 = disabled).
  • Stops tree-sitter for revision buffers whose line count exceeds the threshold.
  • Documents the new option in diffview.txt and diffview_defaults.txt.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
lua/diffview/vcs/file.lua Conditionally stops tree-sitter for large non-LOCAL diff buffers after populating and filetype-detecting the buffer.
lua/diffview/config.lua Adds the large_file_threshold default and inline config description.
doc/diffview.txt Adds help docs for large_file_threshold.
doc/diffview_defaults.txt Adds the new option to the displayed default config snippet.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/config.lua
Comment thread lua/diffview/vcs/file.lua
Comment thread lua/diffview/vcs/file.lua Outdated
Comment thread doc/diffview.txt Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/vcs/file.lua Outdated
Comment thread lua/diffview/vcs/file.lua Outdated
Comment thread lua/diffview/tests/functional/file_spec.lua Outdated
Comment thread lua/diffview/tests/functional/file_spec.lua Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/tests/functional/file_spec.lua
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo merged commit 3832c23 into main Apr 9, 2026
6 checks passed
@dlyongemallo dlyongemallo deleted the large_files_diff_speed branch April 9, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants