mirror of
https://github.com/neovim/neovim
synced 2025-07-16 17:21:49 +00:00
perf(lsp): don't construct potentially expensive strings
This commit is contained in:
committed by
Christian Clason
parent
535c2f8658
commit
c85d15e0d5
@ -366,6 +366,7 @@ PERFORMANCE
|
|||||||
significantly improving |treesitter-highlight| performance.
|
significantly improving |treesitter-highlight| performance.
|
||||||
• Treesitter injection query iteration is now asynchronous, making edits in
|
• Treesitter injection query iteration is now asynchronous, making edits in
|
||||||
large buffers with combined injections much quicker.
|
large buffers with combined injections much quicker.
|
||||||
|
• 10x reduction in blocking time when attaching an LSP to a large buffer.
|
||||||
|
|
||||||
PLUGINS
|
PLUGINS
|
||||||
|
|
||||||
|
@ -278,10 +278,8 @@ function Client:encode_and_send(payload)
|
|||||||
if self.transport:is_closing() then
|
if self.transport:is_closing() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local jsonstr = assert(
|
local jsonstr = vim.json.encode(payload)
|
||||||
vim.json.encode(payload),
|
|
||||||
string.format("Couldn't encode payload '%s'", vim.inspect(payload))
|
|
||||||
)
|
|
||||||
self.transport:write(format_message_with_content_length(jsonstr))
|
self.transport:write(format_message_with_content_length(jsonstr))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user