Skip to content

Parsimonious buffer updates#122

Open
tejasvi wants to merge 1 commit into
rhysd:masterfrom
tejasvi:patch-2
Open

Parsimonious buffer updates#122
tejasvi wants to merge 1 commit into
rhysd:masterfrom
tejasvi:patch-2

Conversation

@tejasvi

@tejasvi tejasvi commented Jan 26, 2022

Copy link
Copy Markdown

Update only the lines which need updating. Prevents unnecessary computations for plugins which listen to buffer change events given the common case is typing already formatted code.

Update only the lines which need updating. Prevents unnecessary computations for plugins which listen to buffer change events.
@rhysd

rhysd commented Feb 3, 2022

Copy link
Copy Markdown
Owner

I think this would cause performance issue when the source is very large (>10000 lines). Checking string and calling setline() which triggers buffer change event at each line. I don't know what 'unnecessary computations for plugins' means exactly, but how about adding :noautocmd to :execute?

execute 'noautocmd' len(splitted) .',$delete' '_'

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